diff --git a/data/scripts/main.js b/data/scripts/main.js index d1ddfc0a..855b72ed 100644 --- a/data/scripts/main.js +++ b/data/scripts/main.js @@ -994,7 +994,14 @@ function toggleTabs(clickedElement, targetId) { function downloadCardImage(linkElement) { if (document.getElementById("inputInfoArtist").value.replace(/ /g, "") != "") { - linkElement.download = cardTextList[0].text.toLowerCase().replace(/ /g, "_") + ".png" + var savedFileName = '' + console.log(cardTextList) + if (cardTextList[0].name == 'Card Nickname') { + savedFileName = cardTextList[1].text + ' (' + cardTextList[0].text + ").png" + } else { + savedFileName = cardTextList[0].text + '.png' + } + linkElement.download = savedFileName if (linkElement.download == ".png") { linkElement.download = "card.png" }