Use tilde as shorthand for {cardname}

Typing out curly braces is tedious, and unfriendly to arthritis/RSI.

MSE users may expect tilde to "just work" in the same way it does on MSE.

Even scryfall queries can be made using the traditional tilde: https://scryfall.com/docs/syntax
This commit is contained in:
RojjaCebolla
2022-11-22 00:29:07 -06:00
committed by GitHub
parent 951445188c
commit 00beb1abd2

View File

@@ -891,7 +891,7 @@ function writeText(textObject, targetContext) {
rawText = params.get('copyright'); //so people using CC for custom card games without WotC's IP can customize their copyright info rawText = params.get('copyright'); //so people using CC for custom card games without WotC's IP can customize their copyright info
if (rawText == 'none') { rawText = ''; } if (rawText == 'none') { rawText = ''; }
} }
if (rawText.toLowerCase().includes('{cardname}')) { if (rawText.toLowerCase().includes('{cardname}' || '~')) {
rawText = rawText.replace(/{cardname}/ig, getCardName()); rawText = rawText.replace(/{cardname}/ig, getCardName());
} }
if (document.querySelector('#info-artist').value == '') { if (document.querySelector('#info-artist').value == '') {