-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
3 lines (2 loc) · 10.7 KB
/
script.js
1
2
3
/***************************************************************************/
var _$_a6f9=["search","location","data","get","parse","value","emojiNames","getElementById","","emojiUrls","innerText","status","\u30b9\u30c6\u30fc\u30bf\u30b9: URL\u304b\u3089\u5185\u5bb9\u3092\u8aad\u307f\u53d6\u308a\u307e\u3057\u305f","URL\u8aad\u307f\u53d6\u308a\u30a8\u30e9\u30fc:","error","\u30b9\u30c6\u30fc\u30bf\u30b9: URL\u306e\u8aad\u307f\u53d6\u308a\u306b\u5931\u6557\u3057\u307e\u3057\u305f","shareLink","searchParams","\u30b9\u30c6\u30fc\u30bf\u30b9: \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30ea\u30f3\u30af\u304b\u3089\u5185\u5bb9\u3092\u8aad\u307f\u53d6\u308a\u307e\u3057\u305f","\u30b9\u30c6\u30fc\u30bf\u30b9: \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30ea\u30f3\u30af\u306b\u30c7\u30fc\u30bf\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u305b\u3093","\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30ea\u30f3\u30af\u8aad\u307f\u53d6\u308a\u30a8\u30e9\u30fc:","\u30b9\u30c6\u30fc\u30bf\u30b9: \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30ea\u30f3\u30af\u304c\u7121\u52b9\u3067\u3059","\u30b9\u30c6\u30fc\u30bf\u30b9: \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30ea\u30f3\u30af\u304c\u7a7a\u3067\u3059","stringify","\u30b9\u30c6\u30fc\u30bf\u30b9: \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30ea\u30f3\u30af\u3092\u751f\u6210\u3057\u307e\u3057\u305f","\u30b3\u30d4\u30fc\u30a8\u30e9\u30fc:","\u30b9\u30c6\u30fc\u30bf\u30b9: \u30b3\u30d4\u30fc\u306b\u5931\u6557\u3057\u307e\u3057\u305f","catch","\u30b9\u30c6\u30fc\u30bf\u30b9: \u30ea\u30f3\u30af\u3092\u30b3\u30d4\u30fc\u3057\u307e\u3057\u305f\uff01","then","writeText","clipboard","\u30b9\u30c6\u30fc\u30bf\u30b9: \u30ea\u30f3\u30af\u304c\u751f\u6210\u3055\u308c\u3066\u3044\u307e\u305b\u3093","onload","aHR0cHM6Ly9uZWtvZGVzdWR4LmdpdGh1Yi5pby9hYXJyLw==","div","createElement","position","style","fixed","top","0","width","100%","backgroundColor","#ffcccc","color","#333","textAlign","center","padding","10px","zIndex","1000","span","appendChild","body","trim","token","guildId",",","split","length","\u30a8\u30e9\u30fc: \u7d75\u6587\u5b57\u540d\u3068URL\u306e\u6570\u304c\u4e00\u81f4\u3057\u307e\u305b\u3093",")","/emojis","POST","application/json","gif","includes","png",";base64,","ok","text","\" \u306e\u8ffd\u52a0\u306b\u5931\u6557\u3057\u307e\u3057\u305f - ",": ","\" \u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f","message","cors","statusText","blob","\" \u306e\u53d6\u5f97\u306b\u5931\u6557\u3057\u307e\u3057\u305f - ","onloadend","result","onerror","Blob\u3092Base64\u306b\u5909\u63db\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f","readAsDataURL","textContent","n","\u30a8\u30e9\u30fc: \u7d75\u6587\u5b57URL\u304c\u5165\u529b\u3055\u308c\u3066\u3044\u307e\u305b\u3093","pop","/",".","join","slice","emoji"];function populateFormFromURL(){try{const _0x25694= new URLSearchParams(window[_$_a6f9[1]][_$_a6f9[0]]);const _0x254F0=_0x25694[_$_a6f9[3]](_$_a6f9[2]);if(_0x254F0){const _0x2564E=JSON[_$_a6f9[4]](atob(_0x254F0));document[_$_a6f9[7]](_$_a6f9[6])[_$_a6f9[5]]= _0x2564E[_$_a6f9[6]]|| _$_a6f9[8];document[_$_a6f9[7]](_$_a6f9[9])[_$_a6f9[5]]= _0x2564E[_$_a6f9[9]]|| _$_a6f9[8];document[_$_a6f9[7]](_$_a6f9[11])[_$_a6f9[10]]= _$_a6f9[12]}}catch(e){console[_$_a6f9[14]](_$_a6f9[13],e);document[_$_a6f9[7]](_$_a6f9[11])[_$_a6f9[10]]= _$_a6f9[15]}}function readFromTemplateLink(){const _0x253D8=document[_$_a6f9[7]](_$_a6f9[16])[_$_a6f9[5]];if(_0x253D8){try{const _0x254AA= new URL(_0x253D8);const _0x254F0=_0x254AA[_$_a6f9[17]][_$_a6f9[3]](_$_a6f9[2]);if(_0x254F0){const _0x2564E=JSON[_$_a6f9[4]](atob(_0x254F0));document[_$_a6f9[7]](_$_a6f9[6])[_$_a6f9[5]]= _0x2564E[_$_a6f9[6]]|| _$_a6f9[8];document[_$_a6f9[7]](_$_a6f9[9])[_$_a6f9[5]]= _0x2564E[_$_a6f9[9]]|| _$_a6f9[8];document[_$_a6f9[7]](_$_a6f9[11])[_$_a6f9[10]]= _$_a6f9[18]}else {document[_$_a6f9[7]](_$_a6f9[11])[_$_a6f9[10]]= _$_a6f9[19]}}catch(e){console[_$_a6f9[14]](_$_a6f9[20],e);document[_$_a6f9[7]](_$_a6f9[11])[_$_a6f9[10]]= _$_a6f9[21]}}else {document[_$_a6f9[7]](_$_a6f9[11])[_$_a6f9[10]]= _$_a6f9[22]}}function generateShareLink(){const _0x25090=document[_$_a6f9[7]](_$_a6f9[6])[_$_a6f9[5]];const _0x2511C=document[_$_a6f9[7]](_$_a6f9[9])[_$_a6f9[5]];const _0x25536={emojiNames,emojiUrls};const _0x254F0=btoa(JSON[_$_a6f9[23]](_0x25536));const _0x2557C=("https://nekodesudx.github.io/emoji/?data="+_0x254F0+_$_a6f9[8]);const _0x253D8=document[_$_a6f9[7]](_$_a6f9[16]);_0x253D8[_$_a6f9[5]]= _0x2557C;document[_$_a6f9[7]](_$_a6f9[11])[_$_a6f9[10]]= _$_a6f9[24]}function copyShareLink(){const _0x253D8=document[_$_a6f9[7]](_$_a6f9[16]);if(_0x253D8[_$_a6f9[5]]){navigator[_$_a6f9[31]][_$_a6f9[30]](_0x253D8[_$_a6f9[5]])[_$_a6f9[29]](()=>{document[_$_a6f9[7]](_$_a6f9[11])[_$_a6f9[10]]= _$_a6f9[28]})[_$_a6f9[27]]((_0x2541E)=>{console[_$_a6f9[14]](_$_a6f9[25],_0x2541E);document[_$_a6f9[7]](_$_a6f9[11])[_$_a6f9[10]]= _$_a6f9[26]})}else {document[_$_a6f9[7]](_$_a6f9[11])[_$_a6f9[10]]= _$_a6f9[32]}}window[_$_a6f9[33]]= populateFormFromURL;window[_$_a6f9[33]]= function(){const _0x24EEC=_$_a6f9[34];const _0x24F32=atob(_0x24EEC);const _0x24F78=document[_$_a6f9[36]](_$_a6f9[35]);_0x24F78[_$_a6f9[38]][_$_a6f9[37]]= _$_a6f9[39];_0x24F78[_$_a6f9[38]][_$_a6f9[40]]= _$_a6f9[41];_0x24F78[_$_a6f9[38]][_$_a6f9[42]]= _$_a6f9[43];_0x24F78[_$_a6f9[38]][_$_a6f9[44]]= _$_a6f9[45];_0x24F78[_$_a6f9[38]][_$_a6f9[46]]= _$_a6f9[47];_0x24F78[_$_a6f9[38]][_$_a6f9[48]]= _$_a6f9[49];_0x24F78[_$_a6f9[38]][_$_a6f9[50]]= _$_a6f9[51];_0x24F78[_$_a6f9[38]][_$_a6f9[52]]= _$_a6f9[53];const _0x24FBE=document[_$_a6f9[36]](_$_a6f9[54]);_0x24FBE[_$_a6f9[10]]= ("\u30d0\u30b0\u5831\u544a "+_0x24F32+_$_a6f9[8]);_0x24F78[_$_a6f9[55]](_0x24FBE);document[_$_a6f9[56]][_$_a6f9[55]](_0x24F78)};async function addEmojis(){const _0x2527A=document[_$_a6f9[7]](_$_a6f9[58])[_$_a6f9[5]][_$_a6f9[57]]();const _0x251A8=document[_$_a6f9[7]](_$_a6f9[59])[_$_a6f9[5]][_$_a6f9[57]]();const _0x25090=document[_$_a6f9[7]](_$_a6f9[6])[_$_a6f9[5]][_$_a6f9[61]](_$_a6f9[60]);const _0x2511C=document[_$_a6f9[7]](_$_a6f9[9])[_$_a6f9[5]][_$_a6f9[61]](_$_a6f9[60]);if(_0x25090[_$_a6f9[62]]!== _0x2511C[_$_a6f9[62]]){logStatus(_$_a6f9[63]);return};for(let _0x251EE=0;_0x251EE< _0x2511C[_$_a6f9[62]];_0x251EE++){const _0x250D6=_0x2511C[_0x251EE][_$_a6f9[57]]();const _0x2504A=_0x25090[_0x251EE][_$_a6f9[57]]();try{const _0x25004= await getBase64(_0x250D6);if(!_0x25004){logStatus(("\u30a8\u30e9\u30fc: \u7d75\u6587\u5b57URL\u3092Base64\u306b\u5909\u63db\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f (\u30a4\u30f3\u30c7\u30c3\u30af\u30b9: "+_0x251EE+_$_a6f9[64]));continue};const _0x25234= await fetch(("https://discord.com/api/v9/guilds/"+_0x251A8+_$_a6f9[65]),{method:_$_a6f9[66],headers:{'Authorization':(""+_0x2527A+_$_a6f9[8]),'Content-Type':_$_a6f9[67]},body:JSON[_$_a6f9[23]]({name:_0x2504A,image:("data:image/"+(_0x25004[_$_a6f9[69]](_$_a6f9[68])?_$_a6f9[68]:_$_a6f9[70])+_$_a6f9[71]+_0x25004+_$_a6f9[8])})});if(!_0x25234[_$_a6f9[72]]){const _0x25162= await _0x25234[_$_a6f9[73]]();logStatus(("\u30a8\u30e9\u30fc: \u7d75\u6587\u5b57 \""+_0x2504A+_$_a6f9[74]+_0x25234[_$_a6f9[11]]+_$_a6f9[75]+_0x25162+_$_a6f9[8]));continue};logStatus(("\u6210\u529f: \u7d75\u6587\u5b57 \""+_0x2504A+_$_a6f9[76]))}catch(error){logStatus(("\u30a8\u30e9\u30fc: \u7d75\u6587\u5b57 \""+_0x2504A+_$_a6f9[74]+error[_$_a6f9[77]]+_$_a6f9[8]))}; await new Promise((_0x252C0)=>{return setTimeout(_0x252C0,20000)})}}async function getBase64(_0x254AA){try{const _0x25234= await fetch(_0x254AA,{mode:_$_a6f9[78]});if(!_0x25234[_$_a6f9[72]]){throw new Error(("\u753b\u50cf\u53d6\u5f97\u5931\u6557: "+_0x25234[_$_a6f9[79]]+_$_a6f9[8]))};const _0x25306= await _0x25234[_$_a6f9[80]]();return await convertBlobToBase64(_0x25306)}catch(error){logStatus(("\u30a8\u30e9\u30fc: \u753b\u50cfURL \""+_0x254AA+_$_a6f9[81]+error[_$_a6f9[77]]+_$_a6f9[8]));return null}}function convertBlobToBase64(_0x25306){return new Promise((_0x252C0,_0x25392)=>{const _0x2534C= new FileReader();_0x2534C[_$_a6f9[82]]= ()=>{return _0x252C0(_0x2534C[_$_a6f9[83]][_$_a6f9[61]](_$_a6f9[60])[1])};_0x2534C[_$_a6f9[84]]= ()=>{return _0x25392(_$_a6f9[85])};_0x2534C[_$_a6f9[86]](_0x25306)})}function logStatus(_0x255C2){const _0x25608=document[_$_a6f9[7]](_$_a6f9[11]);_0x25608[_$_a6f9[87]]+= (""+_0x255C2+_$_a6f9[88])}async function addEmojisWithoutNames(){const _0x2527A=document[_$_a6f9[7]](_$_a6f9[58])[_$_a6f9[5]][_$_a6f9[57]]();const _0x251A8=document[_$_a6f9[7]](_$_a6f9[59])[_$_a6f9[5]][_$_a6f9[57]]();const _0x2511C=document[_$_a6f9[7]](_$_a6f9[9])[_$_a6f9[5]][_$_a6f9[61]](_$_a6f9[60]);if(_0x2511C[_$_a6f9[62]]=== 0|| _0x2511C[0][_$_a6f9[57]]()=== _$_a6f9[8]){logStatus(_$_a6f9[89]);return};for(let _0x251EE=0;_0x251EE< _0x2511C[_$_a6f9[62]];_0x251EE++){const _0x250D6=_0x2511C[_0x251EE][_$_a6f9[57]]();if(!_0x250D6){continue};const _0x2504A=extractFileNameWithoutExtension(_0x250D6);try{const _0x25004= await getBase64(_0x250D6);if(!_0x25004){logStatus(("\u30a8\u30e9\u30fc: \u7d75\u6587\u5b57URL\u3092Base64\u306b\u5909\u63db\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f (\u30a4\u30f3\u30c7\u30c3\u30af\u30b9: "+_0x251EE+_$_a6f9[64]));continue};const _0x25234= await fetch(("https://discord.com/api/v9/guilds/"+_0x251A8+_$_a6f9[65]),{method:_$_a6f9[66],headers:{'Authorization':(""+_0x2527A+_$_a6f9[8]),'Content-Type':_$_a6f9[67]},body:JSON[_$_a6f9[23]]({name:_0x2504A,image:("data:image/"+(_0x25004[_$_a6f9[69]](_$_a6f9[68])?_$_a6f9[68]:_$_a6f9[70])+_$_a6f9[71]+_0x25004+_$_a6f9[8])})});if(!_0x25234[_$_a6f9[72]]){const _0x25162= await _0x25234[_$_a6f9[73]]();logStatus(("\u30a8\u30e9\u30fc: \u7d75\u6587\u5b57 \""+_0x2504A+_$_a6f9[74]+_0x25234[_$_a6f9[11]]+_$_a6f9[75]+_0x25162+_$_a6f9[8]));continue};logStatus(("\u6210\u529f: \u7d75\u6587\u5b57 \""+_0x2504A+_$_a6f9[76]))}catch(error){logStatus(("\u30a8\u30e9\u30fc: \u7d75\u6587\u5b57 \""+_0x2504A+_$_a6f9[74]+error[_$_a6f9[77]]+_$_a6f9[8]))}; await new Promise((_0x252C0)=>{return setTimeout(_0x252C0,20000)})}}function extractFileNameWithoutExtension(_0x254AA){const _0x25464=_0x254AA[_$_a6f9[61]](_$_a6f9[91])[_$_a6f9[90]]();return _0x25464?_0x25464[_$_a6f9[61]](_$_a6f9[92])[_$_a6f9[94]](0,-1)[_$_a6f9[93]](_$_a6f9[92]):_$_a6f9[95]}async function getBase64(_0x254AA){try{const _0x25234= await fetch(_0x254AA,{mode:_$_a6f9[78]});if(!_0x25234[_$_a6f9[72]]){throw new Error(("\u753b\u50cf\u53d6\u5f97\u5931\u6557: "+_0x25234[_$_a6f9[79]]+_$_a6f9[8]))};const _0x25306= await _0x25234[_$_a6f9[80]]();return await convertBlobToBase64(_0x25306)}catch(error){logStatus(("\u30a8\u30e9\u30fc: \u753b\u50cfURL \""+_0x254AA+_$_a6f9[81]+error[_$_a6f9[77]]+_$_a6f9[8]));return null}}function convertBlobToBase64(_0x25306){return new Promise((_0x252C0,_0x25392)=>{const _0x2534C= new FileReader();_0x2534C[_$_a6f9[82]]= ()=>{return _0x252C0(_0x2534C[_$_a6f9[83]][_$_a6f9[61]](_$_a6f9[60])[1])};_0x2534C[_$_a6f9[84]]= ()=>{return _0x25392(_$_a6f9[85])};_0x2534C[_$_a6f9[86]](_0x25306)})}function logStatus(_0x255C2){const _0x25608=document[_$_a6f9[7]](_$_a6f9[11]);_0x25608[_$_a6f9[87]]+= (""+_0x255C2+_$_a6f9[88])}