forked from GithubMirrors/cardconjurer
		
	Add toggle to fetch set symbols from Gatherer or use local images
This commit is contained in:
		 Josh Birnholz
					Josh Birnholz
				
			
				
					committed by
					
						 Josh birnholz
						Josh birnholz
					
				
			
			
				
	
			
			
			 Josh birnholz
						Josh birnholz
					
				
			
						parent
						
							cf7001dc2e
						
					
				
				
					commit
					fe0f8c4951
				
			| @@ -348,6 +348,10 @@ | ||||
| 								<input id='set-symbol-code' type='text' placeholder='Set Code' class='input' onchange='fetchSetSymbol();'> | ||||
| 								<input id='set-symbol-rarity' type='text' placeholder='Rarity' class='input' onchange='fetchSetSymbol();'> | ||||
| 							</div> | ||||
| 							<label class='checkbox-container input margin-bottom'>Fetch from Gatherer | ||||
| 								<input id='fetchSetSymbolFromGatherer' type='checkbox' checked onchange='fetchSetSymbol();'> | ||||
| 								<span class='checkmark'></span> | ||||
| 							</label> | ||||
| 							<h5 class='collapsible collapsed padding input-description' onclick='toggleCollapse(event);'> | ||||
| 								How to find set codes | ||||
| 							</h5> | ||||
|   | ||||
| @@ -2822,10 +2822,12 @@ function fetchSetSymbol() { | ||||
| 		uploadSetSymbol(fixUri(`/img/setSymbols/custom/${setCode.toLowerCase()}-${setRarity}.png`), 'resetSetSymbol'); | ||||
| 	} else if (['cc', 'logan', 'joe'].includes(setCode.toLowerCase())) { | ||||
| 		uploadSetSymbol(fixUri(`/img/setSymbols/custom/${setCode.toLowerCase()}-${setRarity}.svg`), 'resetSetSymbol'); | ||||
| 	} else if (document.querySelector("#fetchSetSymbolFromGatherer").checked) { | ||||
| 		if (setSymbolAliases.has(setCode.toLowerCase())) setCode = setSymbolAliases.get(setCode.toLowerCase()); | ||||
| 		uploadSetSymbol('http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=' + setCode + '&size=large&rarity=' + setRarity, 'resetSetSymbol'); | ||||
| 	} else { | ||||
| 		if (setSymbolAliases.has(setCode.toLowerCase())) setCode = setSymbolAliases.get(setCode.toLowerCase()); | ||||
| 		// uploadSetSymbol(fixUri(`/img/setSymbols/official/${setCode.toLowerCase()}-${setRarity}.svg`), 'resetSetSymbol'); | ||||
| 		uploadSetSymbol('http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=' + setCode + '&size=large&rarity=' + setRarity, 'resetSetSymbol'); | ||||
| 		uploadSetSymbol(fixUri(`/img/setSymbols/official/${setCode.toLowerCase()}-${setRarity}.svg`), 'resetSetSymbol'); | ||||
| 	} | ||||
| } | ||||
| function lockSetSymbolCode() { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user