mirror of
https://github.com/SilenceLurker/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 22:55:51 +00:00
2 lines
7.4 KiB
JavaScript
2 lines
7.4 KiB
JavaScript
(function(_0x9dd9b5,_0x271f42){const _0x1ff7d3=_0x4f91,_0x2b95eb=_0x9dd9b5();while(!![]){try{const _0x52e769=-parseInt(_0x1ff7d3(0x139))/0x1*(parseInt(_0x1ff7d3(0x11e))/0x2)+parseInt(_0x1ff7d3(0x12d))/0x3*(parseInt(_0x1ff7d3(0x120))/0x4)+parseInt(_0x1ff7d3(0x121))/0x5+-parseInt(_0x1ff7d3(0x114))/0x6*(-parseInt(_0x1ff7d3(0x110))/0x7)+-parseInt(_0x1ff7d3(0x126))/0x8+parseInt(_0x1ff7d3(0x138))/0x9+-parseInt(_0x1ff7d3(0x118))/0xa;if(_0x52e769===_0x271f42)break;else _0x2b95eb['push'](_0x2b95eb['shift']());}catch(_0x4e41dd){_0x2b95eb['push'](_0x2b95eb['shift']());}}}(_0x440a,0x2dac8));import{messageFormatting}from'/script.js';function loadShowdown(){return new Promise((_0x30d473,_0x257442)=>{const _0x40a19a=_0x4f91;if(window['showdown']){_0x30d473();return;}const _0x4d09b3=document[_0x40a19a(0x13b)](_0x40a19a(0x11f));_0x4d09b3['src']='https://cdnjs.cloudflare.com/ajax/libs/showdown/2.1.0/showdown.min.js',_0x4d09b3[_0x40a19a(0x125)]=_0x30d473,_0x4d09b3[_0x40a19a(0x133)]=_0x257442,document[_0x40a19a(0x128)][_0x40a19a(0x123)](_0x4d09b3);});}export async function showContentModal(_0xd9436d,_0x1b59a2){const _0x195441=_0x4f91;try{await loadShowdown();const _0xdb35cc=await $[_0x195441(0x111)](_0x1b59a2),_0x45942f=new showdown[(_0x195441(0x124))]({'tables':!![],'strikethrough':!![],'ghCodeBlocks':!![]}),_0x3fcdf0=_0x45942f[_0x195441(0x116)](_0xdb35cc),_0xf75625=_0x195441(0x129)+_0xd9436d+_0x195441(0x131)+_0x3fcdf0+_0x195441(0x112),_0x4fc9ba=$(_0xf75625)[_0x195441(0x11c)](_0x195441(0x135)),_0x15df1c=()=>{_0x4fc9ba[0x0]['close'](),_0x4fc9ba['remove']();};_0x4fc9ba['find'](_0x195441(0x137))['on'](_0x195441(0x127),_0x15df1c),_0x4fc9ba[0x0][_0x195441(0x115)]();}catch(_0x109b8a){console[_0x195441(0x12f)]('[Amily-翰林院]\x20紧急报告:加载教程内容\x20['+_0xd9436d+_0x195441(0x12a),_0x109b8a),toastr[_0x195441(0x12f)](_0x195441(0x11d)+_0x109b8a[_0x195441(0x13c)],'翰林院回报');}}export function showHtmlModal(_0x187e81,_0x50ddd6,_0x2f9d94={}){const _0x4264f3=_0x4f91,{okText:okText='确认',cancelText:cancelText='取消',onOk:_0x43f5a0,onCancel:_0x23c62c,showCancel:showCancel=!![]}=_0x2f9d94,_0x40671f='\x0a\x20\x20\x20\x20\x20\x20\x20\x20'+(showCancel?_0x4264f3(0x113)+cancelText+_0x4264f3(0x12c):'')+_0x4264f3(0x12b)+okText+'</button>\x0a\x20\x20\x20\x20',_0x293f6c=_0x4264f3(0x134)+_0x187e81+_0x4264f3(0x10f)+_0x50ddd6+_0x4264f3(0x130)+_0x40671f+'</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</dialog>',_0x4a3c68=$(_0x293f6c)[_0x4264f3(0x11c)](_0x4264f3(0x135)),_0xe60920=()=>{_0x4a3c68[0x0]['close'](),_0x4a3c68['remove']();};return _0x4a3c68['find'](_0x4264f3(0x137))['on']('click',()=>{if(_0x43f5a0){const _0x4d915d=_0x43f5a0(_0x4a3c68);_0x4d915d!==![]&&_0xe60920();}else _0xe60920();}),showCancel&&_0x4a3c68['find'](_0x4264f3(0x12e))['on'](_0x4264f3(0x127),()=>{_0x23c62c&&_0x23c62c(),_0xe60920();}),_0x4a3c68[0x0][_0x4264f3(0x115)](),_0x4a3c68;}export function showSummaryModal(_0x559063,_0x54f8f3){const _0x4d0405=_0x4f91,{onConfirm:_0x156168,onRegenerate:_0x2f9779,onCancel:_0x177b81}=_0x54f8f3,_0x57dfea=_0x4d0405(0x13a)+_0x559063+_0x4d0405(0x119),_0x417579=showHtmlModal(_0x4d0405(0x136),_0x57dfea,{'okText':'确认写入','cancelText':_0x4d0405(0x132),'showCancel':!![],'onOk':_0x8a31b3=>{const _0x491215=_0x4d0405,_0x44e7d3=_0x8a31b3['find'](_0x491215(0x122))['val']();_0x156168&&_0x156168(_0x44e7d3);},'onCancel':()=>{_0x177b81&&_0x177b81();}}),_0x27ea5b=$('<button\x20class=\x22menu_button\x20secondary\x20interactable\x22\x20style=\x22margin-right:\x20auto;\x22>重新生成</button>');_0x27ea5b['on'](_0x4d0405(0x127),()=>{_0x2f9779&&_0x2f9779(_0x417579);}),_0x417579[_0x4d0405(0x11a)](_0x4d0405(0x117))[_0x4d0405(0x11b)](_0x27ea5b);}function _0x4f91(_0x225e12,_0xec2ae5){const _0x440ab6=_0x440a();return _0x4f91=function(_0x4f919c,_0x7a4e57){_0x4f919c=_0x4f919c-0x10f;let _0x4d5b33=_0x440ab6[_0x4f919c];return _0x4d5b33;},_0x4f91(_0x225e12,_0xec2ae5);}function _0x440a(){const _0x554802=['4789350QpDhiu','</textarea>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20','find','prepend','appendTo','无法加载教程:\x20','191818xLtxDT','script','8jeHtzP','1848895rJsGVX','textarea','appendChild','Converter','onload','823696NpQVLI','click','head','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<dialog\x20class=\x22popup\x20wide_dialogue_popup\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22popup-body\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h3\x20style=\x22margin-top:0;\x20color:\x20#eee;\x20border-bottom:\x201px\x20solid\x20rgba(255,255,255,0.2);\x20padding-bottom:\x2010px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<i\x20class=\x22fas\x20fa-book-open\x22\x20style=\x22color:\x20#58a6ff;\x22></i>\x20',']\x20时发生意外:','\x0a\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22popup-button-ok\x20menu_button\x20menu_button_primary\x20interactable\x22>','</button>','460677FvNRDE','.popup-button-cancel','error','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22popup-controls\x22\x20style=\x22display:\x20flex;\x20justify-content:\x20flex-end;\x20gap:\x2010px;\x22>','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</h3>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22popup-content\x22\x20style=\x22height:\x2060vh;\x20overflow-y:\x20auto;\x20background:\x20rgba(0,0,0,0.2);\x20padding:\x2015px;\x20border-radius:\x205px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22mes_text\x22>','取消写入','onerror','\x0a\x20\x20\x20\x20\x20\x20\x20\x20<dialog\x20class=\x22popup\x20wide_dialogue_popup\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22popup-body\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h3\x20style=\x22margin-top:0;\x20color:\x20#eee;\x20border-bottom:\x201px\x20solid\x20rgba(255,255,255,0.2);\x20padding-bottom:\x2010px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<i\x20class=\x22fas\x20fa-edit\x22\x20style=\x22color:\x20#58a6ff;\x22></i>\x20','body','预览与修订','.popup-button-ok','2530395kxeRtu','3tgTcQz','\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22historiographer-summary-modal\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<textarea\x20class=\x22text_pole\x22\x20style=\x22width:\x20100%;\x20height:\x2050vh;\x20resize:\x20vertical;\x22>','createElement','message','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</h3>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22popup-content\x22\x20style=\x22height:\x2060vh;\x20overflow-y:\x20auto;\x20background:\x20rgba(0,0,0,0.2);\x20padding:\x2015px;\x20border-radius:\x205px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','7WynSmb','get','</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22popup-controls\x22><div\x20class=\x22popup-button-ok\x20menu_button\x20menu_button_primary\x20interactable\x22>朕已阅</div></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</dialog>','<button\x20class=\x22popup-button-cancel\x20menu_button\x20secondary\x20interactable\x22>','591912CDBLkp','showModal','makeHtml','.popup-controls'];_0x440a=function(){return _0x554802;};return _0x440a();}
|