setsymbolfromgatherer
| Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB | 
| Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 158 KiB | 
| Before Width: | Height: | Size: 165 KiB After Width: | Height: | Size: 165 KiB | 
| Before Width: | Height: | Size: 178 KiB After Width: | Height: | Size: 178 KiB | 
| Before Width: | Height: | Size: 155 KiB After Width: | Height: | Size: 155 KiB | 
| @@ -70,6 +70,13 @@ cardArt.onload = function() { | ||||
|     document.getElementById('inputCardArtY').value = artY | ||||
| 	cardArtUpdated() | ||||
| } | ||||
| function setSymbolFromGatherer() { | ||||
| 	if (document.getElementById('inputSetCode').value.toLowerCase() == 'cc') { | ||||
| 		setSymbol.src = 'http://cardconjurer.com/data/images/misc/cc-' + document.getElementById('inputSetRarity').value.toLowerCase() | ||||
| 	} else { | ||||
| 		autoCrop(setSymbol, 'https://cors-anywhere.herokuapp.com/http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=' + document.getElementById('inputSetCode').value + '&size=large&rarity=' + document.getElementById('inputSetRarity').value) | ||||
| 	} | ||||
| } | ||||
| setSymbol.onload = function() { | ||||
| 	if (setSymbol.width / setSymbol.height > setSymbolWidth / setSymbolHeight) { | ||||
| 		setSymbolDrawWidth = setSymbolWidth | ||||
| @@ -680,6 +687,8 @@ function manaCostUpdated() { | ||||
| 	drawCardObjects() | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
| function watermarkUpdated() { | ||||
| 	if (document.getElementById('inputWatermarkPrimary').value != 'none') { | ||||
| 		watermarkContext.clearRect(0, 0, cardWidth, cardHeight) | ||||
| @@ -767,7 +776,8 @@ function inputCardNameNumberTextImport(index) { | ||||
|     document.getElementById('inputCardArtName').value = beforeAfter(importCardTextResponse, '"name":"', '",') | ||||
|     document.getElementById('inputSetCode').value = beforeAfter(importCardTextResponse, '"set":"', '",') | ||||
|     document.getElementById('inputSetRarity').value = beforeAfter(importCardTextResponse, '"rarity":"', '",')[0] | ||||
|     autoCrop(setSymbol, 'https://cors-anywhere.herokuapp.com/http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=' + document.getElementById('inputSetCode').value + '&size=large&rarity=' + document.getElementById('inputSetRarity').value) | ||||
|     setSymbolFromGatherer() | ||||
|     // autoCrop(setSymbol, 'https://cors-anywhere.herokuapp.com/http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=' + document.getElementById('inputSetCode').value + '&size=large&rarity=' + document.getElementById('inputSetRarity').value) | ||||
|     inputCardArtName(beforeAfter(importCardTextResponse, '"name":"', '",')) | ||||
|     manaCostUpdated() | ||||
|     drawCardText() | ||||
|   | ||||
| @@ -135,8 +135,8 @@ | ||||
| 					<div class="autoGrid"> | ||||
| 				        <input type="file" accept="image/*" onchange="uploadImage(event, setSymbol)" placeholder="Via File Upload"> | ||||
| 				        <input type="text" placeholder="Via URL" onchange="setSymbol.src = 'https://cors-anywhere.herokuapp.com/' + this.value"> | ||||
| 				        <input type="text" id="inputSetCode" placeholder="Via Set Code" onchange="autoCrop(setSymbol, 'https://cors-anywhere.herokuapp.com/http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=' + this.value + '&size=large&rarity=' + document.getElementById('inputSetRarity').value)"> | ||||
| 				        <input type="text" id="inputSetRarity" placeholder="Rarity" onchange="autoCrop(setSymbol, 'https://cors-anywhere.herokuapp.com/http://gatherer.wizards.com/Handlers/Image.ashx?type=symbol&set=' + document.getElementById('inputSetCode').value + '&size=large&rarity=' + this.value)"> | ||||
| 				        <input type="text" id="inputSetCode" placeholder="Via Set Code" onchange="setSymbolFromGatherer()"> | ||||
| 				        <input type="text" id="inputSetRarity" placeholder="Rarity" onchange="setSymbolFromGatherer()"> | ||||
| 				        <!-- <button class="button" onclick="randomSet()">Random</button> --> | ||||
| 				    </div> | ||||
| 				</div> | ||||
|   | ||||
 Kyle
					Kyle