From 8d67bca28e3ff9deb6b9974bd6b4f5c6a3df23e3 Mon Sep 17 00:00:00 2001 From: Kyle <41976328+ImKyle4815@users.noreply.github.com> Date: Tue, 16 Jun 2020 17:19:56 -0700 Subject: [PATCH] set symbol fix --- data/scripts/main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/data/scripts/main.js b/data/scripts/main.js index 71e735a4..91b26d0f 100644 --- a/data/scripts/main.js +++ b/data/scripts/main.js @@ -72,7 +72,11 @@ cardArt.onload = function() { } function setSymbolFromGatherer() { if (document.getElementById('inputSetCode').value.toLowerCase() == 'cc') { - setSymbol.src = 'http://cardconjurer.com/data/images/misc/cc-' + document.getElementById('inputSetRarity').value.toLowerCase() + var newSetSymbolSource = 'http://cardconjurer.com/data/images/misc/cc-' + document.getElementById('inputSetRarity').value.toLowerCase() + if (document.getElementById('inputSetRarity').value == '') { + newSetSymbolSource += 'c' + } + setSymbol.src = newSetSymbolSource + '.png' } 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) }