From 7502f6f7215006e83d3460fb8c3c31d2de5d5cf7 Mon Sep 17 00:00:00 2001 From: Kyle <41976328+ImKyle4815@users.noreply.github.com> Date: Sat, 12 Sep 2020 14:14:44 -0700 Subject: [PATCH] noflavor option --- data/scripts/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/data/scripts/main.js b/data/scripts/main.js index dafeca7c..d1ddfc0a 100644 --- a/data/scripts/main.js +++ b/data/scripts/main.js @@ -23,6 +23,9 @@ date = new Date() var cornerCutout = new Image() cornerCutout.src = '/data/images/cardImages/cornerCutout.png' +//URL Parameters +var URLParams = new URLSearchParams(window.location.search) + function addToManaSymbolList(folderPath, newManaSymbolList) { for (var i = 0; i < newManaSymbolList.length; i ++) { if (!manaSymbolCodeList.includes(newManaSymbolList[i].replace('.svg', ''))) { @@ -929,7 +932,7 @@ function inputCardNameNumberTextImport(index) { flavorText = flavorText.replace('*', '{i}') } } - if (flavorText.length < 10) { + if (flavorText.length < 10 || URLParams.get('noflavor') != null) { flavorText = '' } importText((beforeAfter(importCardTextResponse, '"oracle_text":"', '",') + flavorText).replace(/\n\\"/g, '\n\u201C').replace(/{flavor}\\"/g, '{flavor}\u201C').replace(/\\n/g, '\n').replace(/ \\"/g, ' \u201C').replace(/\\"/g, '\u201D').replace(/\(/g, '{i}(').replace(/\)/g, '){/i}'), 'Rules Text')