filesafe/dist/js/misc/render.js.map

1 line
6.8 KiB
Plaintext
Raw Normal View History

{"version":3,"sources":["render.js"],"names":["const","render","lsKey","configs","al","name","root","array","Array","apply","length","map","_","i","slice","miku","config","selected","done","renderEnabled","localStorage","div","document","createElement","innerHTML","buttons","reload","text","className","confirm","swal","content","then","value","do","newValue","querySelector","checked","removeItem","timer","renderScript","dataset","version","parseSelectedConfig","previousElement","remove","element","parseVersion","Math","floor","random","alt","title","src","classList","add","addEventListener","showTogglePrompt","body","appendChild","page","apiChecked","readyState","onloaded","window"],"mappings":"AAEAA,IAAMC,OAAS,CACbC,MAAO,SACPC,QAAS,CACPC,GAAI,CACFC,KAAM,cACNC,KAAM,aAENC,MAAOC,MAAMC,MAAM,KAAM,CAAEC,OAAQ,KAAMC,KAAG,SAAEC,EAAGC,GAAG,OAAO,MAAQA,EAAI,IAAIC,OAAO,GAAE,MAAA,KAEtFC,KAAM,CACJV,KAAM,WACNC,KAAM,eAENC,MAAOC,MAAMC,MAAM,KAAM,CAAEC,OAAQ,KAAMC,KAAG,SAAEC,EAAGC,GAAG,OAAO,MAAQA,EAAI,IAAIC,OAAO,GAAE,MAAA,MAGxFE,OAAQ,KACRC,SAAU,KACVC,MAAM,EAGRjB,iBAAuB,WACrBD,IAAMmB,IAAiD,MAA/BC,aAAanB,OAAOC,QACtCmB,EAAMC,SAASC,cAAc,OACnCF,EAAIG,UAAY,+IAIiCL,EAAgB,UAAY,IAAE,wCAC7ClB,OAAOe,OAAO,KAAI,kMAOpDhB,IAAMyB,EAAU,CAAA,EACZN,IACFM,EAAQC,OAAS,CACfC,KAAM,sCACNC,UAAW,wBAGfH,EAAQI,SAAU,EAElBC,KAAK,CACHC,QAASV,EATTI,QAUAA,IACCO,MAAI,SAACC,GACN,GAAc,WAAVA,EACFhC,OAAOiC,IAAG,QACL,GAAID,EAAO,CAChBjC,IAAMmC,EAAWd,EAAIe,cAAc,eAAeC,aAAU,EAAS,IACjEF,IAAaf,aAAanB,OAAOC,SA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zCnC,SAASoC,KAAKC,YAAYb,EA9ByB,CAqBrD,EAYA7C,SAAe,WAGO,oBAAT2D,MAAwBA,KAAKC,aAAe5D,OAAOiB,MAC5DjB,OAAOiC,IARX,GAY4B,gBAAxBZ,SAASwC,YAAwD,aAAxBxC,SAASwC,WACpD7D,OAAO8D,WAEPC,OAAOR,iBAAiB,oBAAkB,WAAK,OAAGvD,OAAO8D,UAAQ","file":"render.js","sourcesContent":["/* global page, swal */\n\nconst render = {\n lsKey: 'render',\n configs: {\n al: {\n name: 'ship waifu~',\n root: 'render/al/',\n // 001.png ~ 038.png\n array: Array.apply(null, { length: 38 }).map((_, i) => `${('00' + (i + 1)).slice(-3)}.png`)\n },\n miku: {\n name: 'miku ❤️~',\n root: 'render/miku/',\n // 001.png ~ 050.png\n array: Array.apply(null, { length: 50 }).map((_, i) => `${('00' + (i + 1)).slice(-3)}.png`)\n }\n },\n config: null,\n selected: null,\n done: false\n}\n\nrender.showTogglePrompt = () => {\n const renderEnabled = !(localStorage[render.lsKey] === '0')\n const div = document.createElement('div')\n div.innerHTML = `\n <div class=\"field\">\n <div class=\"control\">\n <label class=\"checkbox\">\n <input id=\"swalRender\" type=\"checkbox\" ${renderEnabled ? 'checked' : ''}>\n Enable random render of ${render.config.name}\n </label>\n </div>\n <p class=\"help\">If disabled, you will still be able to see a small button on the bottom right corner of the screen to re-enable it.</p>\n </div>\n `\n\n const buttons = {}\n if (renderEnabled) {\n buttons.reload = {\n text: 'Nah fam, show me a different render',\n className: 'swal-button--cancel'\n