開いているWebページを自分のprojectに引用するbookmarkを例にとると(minify≠難読化)
code:元のコード.js
(()=>{
const my_project = "Summer498";
const LF='\n'
const _window = window;
const _encodeURIComponent = encodeURIComponent;
const _scrapbox=_window.scrapbox;
const getTitle = title => prompt(Scrap "${title}" to /${my_project}/., title);
let title, first_line, lines, quote;
if(_scrapbox){
const project_name = _scrapbox.Project.name;
const page = _scrapbox.Page;
const page_title = page.title;
const page_path = project_name + "/" + page_title;
title = getTitle(page_title);
if(title){
first_line = from [/${page_path}];
quote = page.lines.map(e=>e.text).slice(1);
}
}
else {
const document_title = document.title;
title = getTitle(document_title);
if(title){
first_line = from [${location.href} ${document_title}];
const selection = getSelection().toString();
quote = selection.trim() ? selection.split(LF).map(e=>'> '+e) : ""; }
}
if(title){
const body = _encodeURIComponent(lines.join(LF));
open(https://scrapbox.io/${my_project}/${_encodeURIComponent(title.trim())}?body= + body);
}
})();
code:minified.js
(()=>{const p="Summer498",m=`
,_=window,r=encodeURIComponent,c=_.scrapbox,a=t=>prompt(Scrap "${t}" to /${p}/.,t);let o,i,l,s;if(c){const t=c.Project.name,e=c.Page,n=e.title,d=t+"/"+n;o=a(n),o&&(i=from /${d},s=e.lines.map(f=>f.text).slice(1))}else{const t=document.title;if(o=a(t),o){i=from ${location.href} ${t};const e=getSelection().toString();s=e.trim()?e.split(m).map(n=>"> "+n):[""]}}if(o){l=[i,""].concat(s);const t=r(l.join(m));open(https://scrapbox.io/${p}/${r(o.trim())}?body=`+t)}})(); code:obfuscated-and-minified.js
(function(x,a){const e=_0x2180,t=x();for(;[];)try{if(-parseInt(e(493))/1+parseInt(e(495))/2+-parseInt(e(516))/3*(parseInt(e(510))/4)+-parseInt(e(500))/5*(-parseInt(e(515))/6)+parseInt(e(509))/7+parseInt(e(512))/8*(parseInt(e(498))/9)+parseInt(e(514))/10*(parseInt(e(491))/11)===a)break;t.push(t.shift())}catch{t.push(t.shift())}})(_0x3708,934611),(()=>{const x=_0x2180,a="Summer498",e=`
`,t=window,f=encodeURIComponent,s=tx(494),i=n=>prompt(x(502)+n+x(511)+a+"/.",n);let c,_,p,b;if(s){const n=sx(496)x(503),o=sx(508),r=ox(501),u=n+"/"+r;c=i(r),c&&(_=x(497)+u+"]",b=o.linesx(492)(I=>Ix(490))x(506)(1))}else{const n=documentx(501);if(c=i(n),c){_="from ["+locationx(505)+" "+n+"]";const o=getSelection()x(499)();b=ox(507)()?ox(504)(e).map(r=>"> "+r):""}}if(c){p=_,"".concat(b);const n=f(px(489)(e));open("https://scrapbox.io/"+a+"/"+f(c[x(507)]())+x(513)+n)}})();function _0x2180(x,a){const e=_0x3708();return _0x2180=function(t,f){return t=t-489,et},_0x2180(x,a)}function _0x3708(){const x=["1842188RTJZDf","scrapbox","2603104vhushc","Project","from /","1562103gzWYWg","toString","11995STFYzi","title",'Scrap "',"name","split","href","slice","trim","Page","6212346qamlIv","6454732vZzwVN",'" to /',"80xDPKKK","?body=","504730Xkwxxa","660IYgnZW","3TKlMKs","join","text","44XhhgQi","map";return _0x3708=function(){return x},_0x3708()} 簡単に追跡されないよう、複数のobjectを介して函数等を実行している
さすがにこれを読むのはしんどい
読めちゃマズいのでシンドいのは当然やねSummer498.icon
2024-11-18
nishio.iconこの難読化されたJavaScriptが何をやってるか解説して
gpt.icon(GPT-4o)
コードの目的
このコードは、現在のページや選択テキストを Scrapbox プロジェクトに追加するためのブックマークレットとして動作している可能性が高いです。
主な動作:
ページや選択テキストを取得。
ユーザー入力を受けてデータを加工。
Scrapbox 用の URL を生成し、新しいウィンドウまたはタブを開く。
正解!nishio.icon
AIに対して嫌がらせbsahd.icon
code:obfuscate2.js
function _0x386c(_0x11248d,_0x10b0d8){const _0x3cefa8=_0x20fb();return _0x386c=function(_0x41004a,_0x24c822){_0x41004a=_0x41004a-(0x160f+-0xea2+-0x668);let _0x2dc507=_0x3cefa8_0x41004a;if(_0x386c'ACLbWv'===undefined){var _0x2976a0=function(_0x1ba8f7){const _0x3322b7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5114ac='',_0x3ba9b5='',_0x5427b3=_0x5114ac+_0x2976a0;for(let _0x48d40d=-0x20b1+-0x1e63+0x3f14,_0x41bce9,_0x174c54,_0x4688cb=0x728+-0x2d*0x51+-0x7*-0x103;_0x174c54=_0x1ba8f7'charAt'(_0x4688cb++);~_0x174c54&&(_0x41bce9=_0x48d40d%(-0x13ae+0x2402+-0x57*0x30)?_0x41bce9*(0x10e9+0xbe9+0x1*-0x1c92)+_0x174c54:_0x174c54,_0x48d40d++%(0x166b+-0x3*0x41f+-0xa0a))?_0x5114ac+=_0x5427b3'charCodeAt'(_0x4688cb+(0xf32+0x256b+-0x3493))-(-0x1150+-0x1aa6*0x1+0x58*0x80)!==-0x225f+-0x516*0x3+0x5*0x9ed?String'fromCharCode'(-0x3b0*0x5+0x14e3*0x1+-0x174&_0x41bce9>>(-(0xc5f+0x1db2+-0x2a0f)*_0x48d40d&0x15e5+0xb36+-0x2115)):_0x48d40d:-0x3*-0x43b+0x7*-0x9b+0x2*-0x43a){_0x174c54=_0x3322b7'indexOf'(_0x174c54);}for(let _0x12fdb6=-0x240*-0x6+-0x1*0x1849+0xfb*0xb,_0x56ce1f=_0x5114ac'length';_0x12fdb6<_0x56ce1f;_0x12fdb6++){_0x3ba9b5+='%'+('00'+_0x5114ac'charCodeAt'(_0x12fdb6)'toString'(-0x1a0c+-0xf*-0x59+0x14e5))'slice'(-(-0x2298+-0x23c7+0x4661));}return decodeURIComponent(_0x3ba9b5);};_0x386c'VgKCIN'=_0x2976a0,_0x11248d=arguments,_0x386c'ACLbWv'=!![];}const _0x4075a6=_0x3cefa8-0x23bc+-0x865+0x2c21,_0x31ca11=_0x41004a+_0x4075a6,_0x5eb761=_0x11248d_0x31ca11;if(!_0x5eb761){const _0x3dcf9a=function(_0x126d94){this'CbYnoN'=_0x126d94,this'owMNvL'=0x14ce+-0x2*0xf67+0xa01,-0x1*-0x315+0x11e+-0x433*0x1,0x1a86+0x12*-0x183+0x16*0x8,this'oxBPPH'=function(){return'newState';},this'AZRNLV'='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this'YQpMdv'='\x27|\x22.+\x27|\x22;?\x20*}';};_0x3dcf9a'prototype''fxeDmQ'=function(){const _0x3700e5=new RegExp(this'AZRNLV'+this'YQpMdv'),_0xee73c4=_0x3700e5'test'(this'oxBPPH''toString'())?--this'owMNvL'-0x1*0x23ef+-0x5*-0x35f+-0x1*-0x1315:--this'owMNvL'-0xc2b+0x1b21+-0xef6*0x1;return this'FUhBYL'(_0xee73c4);},_0x3dcf9a'prototype''FUhBYL'=function(_0x540eab){if(!Boolean(~_0x540eab))return _0x540eab;return this'tZmfWW'(this'CbYnoN');},_0x3dcf9a'prototype''tZmfWW'=function(_0x36bc3e){for(let _0x417526=-0x63*-0x51+0xb6d+-0x2ac0,_0x336f62=this'owMNvL''length';_0x417526<_0x336f62;_0x417526++){this'owMNvL''push'(Math'round'(Math'random'())),_0x336f62=this'owMNvL''length';}return _0x36bc3e(this'owMNvL'-0x4cf+-0x665*0x1+0xb34);},new _0x3dcf9a(_0x386c)'fxeDmQ'(),_0x2dc507=_0x386c'VgKCIN'(_0x2dc507),_0x11248d_0x31ca11=_0x2dc507;}else _0x2dc507=_0x5eb761;return _0x2dc507;},_0x386c(_0x11248d,_0x10b0d8);}(function(_0x15cc17,_0x14aa96){const _0x13ab62=_0x15cc17();function _0x3029b0(_0x32cc51,_0x172342,_0x1b866f,_0x26e66c){return _0x386c(_0x172342- -0xab,_0x1b866f);}function _0x41672b(_0x53df76,_0x3fb6dd,_0x2f7814,_0x1e25b6){return _0x386c(_0x1e25b6- -0x1ee,_0x53df76);}while(!![]){try{const _0x1101a6=parseInt(_0x3029b0(0x5a,0x7c,0x9f,0x85))/(-0x1*0x1d0b+0x3*-0x24e+0x23f6)*(parseInt(_0x3029b0(0xa0,0x9f,0x95,0x84))/(-0x1134+0x6a*-0x5b+0x36e4))+parseInt(_0x41672b(-0x9b,-0xb0,-0x8d,-0xa5))/(-0x1812+0x1*-0x18b9+0x1*0x30ce)+-parseInt(_0x3029b0(0x7a,0x76,0x5c,0x58))/(0x1*0x1099+0x9db+0x30*-0x8d)*(parseInt(_0x3029b0(0x8b,0x96,0x87,0x9e))/(-0xbfa+-0x1e64+0x3*0xe21))+-parseInt(_0x41672b(-0xe2,-0xbb,-0xb9,-0xc1))/(-0x36*0x1d+0xeb+-0x539*-0x1)*(-parseInt(_0x41672b(-0x104,-0xe7,-0xb8,-0xdc))/(-0x121d*-0x1+0x5db*-0x4+0x556))+parseInt(_0x3029b0(0x77,0x9b,0x91,0x7e))/(0x21e6+-0x127b*0x2+-0x18c*-0x2)*(parseInt(_0x3029b0(0x53,0x71,0x6b,0x6f))/(-0x253a+-0x1f*0x2+0x2581))+parseInt(_0x3029b0(0xb2,0x9c,0x7f,0x9d))/(0xf4b+-0xe78+0x3*-0x43)+parseInt(_0x41672b(-0x104,-0xd7,-0xe7,-0xdb))/(-0x1c3+-0x20f5+0x22c3)*(-parseInt(_0x41672b(-0x96,-0xc8,-0x8e,-0xb4))/(0xd35+0x1a26*0x1+-0x274f));if(_0x1101a6===_0x14aa96)break;else _0x13ab62'push'(_0x13ab62'shift'());}catch(_0x4b6f49){_0x13ab62'push'(_0x13ab62'shift'());}}}(_0x20fb,-0x320e5+0x1*0x71f5b+0x100ba));const _0xb3328b=(function(){const _0x53a9b5={};_0x53a9b5'rOtGO'=function(_0x19c346,_0x534234){return _0x19c346===_0x534234;},_0x53a9b5_0x14bcb3(0x4d5,0x4a6,0x4c4,0x49f)=_0x14bcb3(0x4bb,0x475,0x499,0x4b1);function _0x4a28e7(_0x258b09,_0x2bf531,_0x4cb340,_0x50b595){return _0x386c(_0x50b595- -0xa8,_0x258b09);}_0x53a9b5_0x14bcb3(0x4b2,0x4cc,0x4b5,0x491)=function(_0x2681cf,_0x3c79ba){return _0x2681cf===_0x3c79ba;},_0x53a9b5_0x14bcb3(0x4d1,0x4a4,0x4cb,0x4de)=_0x4a28e7(0x80,0x5e,0x51,0x67);const _0x5403b9=_0x53a9b5;let _0x594a63=!![];function _0x14bcb3(_0x4fa42b,_0x4ec6a1,_0x31234d,_0x446054){return _0x386c(_0x31234d-0x389,_0x446054);}return function(_0x429d66,_0x331d06){function _0xa07050(_0x2229a3,_0x72de07,_0x10583f,_0x911086){return _0x4a28e7(_0x2229a3,_0x72de07-0x72,_0x10583f-0xa3,_0x10583f- -0x20);}const _0xd2839d={'YVzGd':function(_0x559ac5,_0x4d5108){function _0xc424e3(_0x1afa07,_0x2c5fef,_0x1551e4,_0x4a8cef){return _0x386c(_0x1551e4-0x2bd,_0x1afa07);}return _0x5403b9_0xc424e3(0x3ec,0x434,0x412,0x41d)(_0x559ac5,_0x4d5108);},'bpQzw':_0x5403b9_0x28c1e1(0x226,0x214,0x21c,0x24c)};function _0x28c1e1(_0x59581b,_0x3a52cc,_0x25eadb,_0xf90ed1){return _0x4a28e7(_0xf90ed1,_0x3a52cc-0xdb,_0x25eadb-0xa3,_0x59581b-0x193);}if(_0x5403b9_0xa07050(0x80,0x54,0x64,0x4d)(_0x5403b9_0xa07050(0x6f,0x5e,0x7a,0x6e),_0x5403b9_0xa07050(0x7d,0x65,0x7a,0x61))){const _0x15dff0=_0x594a63?function(){function _0x62da35(_0x1a0f35,_0x3d6e5c,_0x534f67,_0xbce15d){return _0x28c1e1(_0xbce15d-0x27d,_0x3d6e5c-0x9,_0x534f67-0x11c,_0x3d6e5c);}function _0x23ed84(_0x43b804,_0x349749,_0x40a072,_0x4c8273){return _0x28c1e1(_0x349749- -0x456,_0x349749-0x143,_0x40a072-0x1,_0x40a072);}if(_0x331d06){if(_0xd2839d_0x62da35(0x497,0x46a,0x46f,0x48d)(_0xd2839d'bpQzw',_0xd2839d_0x23ed84(-0x24c,-0x25f,-0x24e,-0x23f))){const _0x344ab6=_0x331d06_0x23ed84(-0x237,-0x25e,-0x269,-0x238)(_0x429d66,arguments);return _0x331d06=null,_0x344ab6;}else{const _0x46aa23=_0x3d5efe?function(){function _0x46e2a5(_0x535748,_0x531798,_0x3ca705,_0x3bed5a){return _0x23ed84(_0x535748-0x17d,_0x3bed5a-0x2f4,_0x535748,_0x3bed5a-0x18f);}if(_0x47fff7){const _0x1fef2b=_0x3e19b6_0x46e2a5(0xa1,0xaf,0xaa,0x96)(_0x3de847,arguments);return _0x402a04=null,_0x1fef2b;}}:function(){};return _0x2a845b=![],_0x46aa23;}}}:function(){};return _0x594a63=![],_0x15dff0;}else{const _0x8fa0b=_0x2f60c1'apply'(_0x41304c,arguments);return _0x257171=null,_0x8fa0b;}};}()),_0xb2a5d=_0xb3328b(this,function(){const _0x347751={};function _0x1240c2(_0x59c6fd,_0x5ade83,_0x2ac8b3,_0x22aaab){return _0x386c(_0x22aaab- -0x23c,_0x2ac8b3);}_0x347751'ihCaC'='(((.+)+)+)'+'+$';const _0x35d644=_0x347751;function _0x2d8cde(_0x263b1e,_0x57751c,_0x1d828c,_0x15cd85){return _0x386c(_0x15cd85- -0x39a,_0x263b1e);}return _0xb2a5d_0x2d8cde(-0x255,-0x276,-0x229,-0x24f)()_0x1240c2(-0x117,-0x112,-0xfe,-0x10a)(_0x35d644_0x2d8cde(-0x26a,-0x26c,-0x26b,-0x266))_0x1240c2(-0x10f,-0xdf,-0x10f,-0xf1)()_0x2d8cde(-0x2b3,-0x27e,-0x27a,-0x295)+'r'(_0xb2a5d)_0x2d8cde(-0x276,-0x289,-0x241,-0x268)(_0x35d644_0x1240c2(-0x114,-0xec,-0xe3,-0x108));});function _0x20fb(){const _0x1ba315='BgLUzxm','Bu51q2W','wgTws0W','y3rVCIGICMv0Dq','E30Uy29UC3rYDq','DgL0Bgu','rNLWBuy','y29Uy2f0','zNjVBsbBlW','CK90r08','y29UC3rYDwn0BW','zxjYB3i','ChjVDg90ExbL','te1IzhO','yMLUza','C2nYyxbIB3G','D2fYBG','yNbrENC','yxbWBhK','zNjVBsbB','CxzQywm','yvPWuLe','DhjPBq','n3v0ChDQBq','mtq0nZCXmgHyv2vZsW','u3vTBwvYndK4','BMfTzq','DuPhCva','y29UC29Szq','Dgv4Da','BgvUz3rO','B0PRsg4','u2nYyxaGiG','nteXmJyYmwzms1jfvG','A3rxC3a','BMn0Aw9UkcKG','BLrHAg0','C3bSAxq','ntmYrxLywfPK','CMv0DxjUicHMDq','A21rshK','vMLRBem','wvz6r2q','BwfW','mvHWC3n1wa','Exf2wwS','q25vqKi','DMTtyLq','C2XPy2u','z0v0s3i','mZKWnduXogXSsxnqBa','tMrxCe0','v2XcAvm','sgzeyxe','vuDXyuq','C2vHCMnO','v0jxyw0','AwHdyum','iIb0BYaV','zxHJzxb0Aw9U','s3z2u2G','Aw5MBW','Ahr0Chm6lY9ZyW','mtKYChb4EeX2','twHHEKK','x19WCM90B19F','DwfMCxO','vhLnBuC','ugfNzq','CujAvNG','ntaWnxjbAhPPvG','DffLsKK','uhjVAMvJDa','BwTZB2S','BvPuAfC','ohj5y1fKAW','nty0mJK3mfDJt3ftqq','Bg9N','nti5nJi2yufVtKrL','mtiXmZqWoeL6Dg9sza','Dg9tDhjPBMC';_0x20fb=function(){return _0x1ba315;};return _0x20fb();}_0xb2a5d();const _0x2cbee6=(function(){let _0x4a675a=!![];return function(_0x1f6b57,_0x1670de){const _0x37619b=_0x4a675a?function(){function _0x3244b7(_0x2cf7be,_0x30b8aa,_0x49e215,_0x470525){return _0x386c(_0x30b8aa-0x172,_0x470525);}if(_0x1670de){const _0x4ec234=_0x1670de_0x3244b7(0x26e,0x27f,0x28e,0x28c)(_0x1f6b57,arguments);return _0x1670de=null,_0x4ec234;}}:function(){};return _0x4a675a=![],_0x37619b;};}()),_0x1b4d1f=_0x2cbee6(this,function(){const _0x42a90e={'HkbVJ':function(_0x3dc9bb,_0x8e125){return _0x3dc9bb+_0x8e125;},'mksok':function(_0x56debc,_0x269b22){return _0x56debc(_0x269b22);},'WBWam':_0x5319c7(-0x43,-0x40,-0x53,-0x43)+_0x6eef3(0x120,0x100,0x131,0x10e),'XkVKL':_0x5319c7(-0x3c,-0x1f,-0x25,-0x42)+_0x6eef3(0x162,0x13a,0x131,0x13f)+'rn\x20this\x22)('+'\x20)','nTahm':function(_0x2c3e7c){return _0x2c3e7c();},'ktWsp':_0x6eef3(0x161,0x142,0x112,0x138),'qBZVx':_0x5319c7(-0x62,-0x43,-0x6a,-0x8d),'mZThW':_0x5319c7(-0x49,-0x46,-0x3d,-0x38),'oJkHn':_0x5319c7(-0x4a,-0x83,-0x6f,-0x8e),'KvvSh':_0x6eef3(0x147,0x119,0x10f,0x126),'CnUBB':'table','JobXx':function(_0x430256,_0x22bbc0){return _0x430256<_0x22bbc0;},'vkSbT':function(_0x5cb890,_0x5e47e5){return _0x5cb890!==_0x5e47e5;},'kmQHy':_0x5319c7(-0x67,-0x6d,-0x5f,-0x3f)};let _0x4b2557;try{const _0x2b2439=Function(_0x42a90e_0x5319c7(-0x5e,-0x67,-0x42,-0x4c)+_0x42a90e_0x5319c7(-0x6,-0x38,-0x27,-0x17)+');');_0x4b2557=_0x42a90e_0x5319c7(-0x40,-0x7c,-0x56,-0x33)(_0x2b2439);}catch(_0x540265){_0x4b2557=window;}function _0x6eef3(_0x4a684d,_0x452e69,_0x378da4,_0x4777a9){return _0x386c(_0x4777a9- -0x10,_0x378da4);}function _0x5319c7(_0x4eac81,_0x4fb65d,_0xddbd72,_0x9c33b3){return _0x386c(_0xddbd72- -0x175,_0x9c33b3);}const _0x1db341=_0x4b2557_0x5319c7(-0x5e,-0x54,-0x5e,-0x64)=_0x4b2557'console'||{},_0xa3b94f=[_0x42a90e_0x5319c7(-0x5c,-0x5c,-0x58,-0x80),_0x42a90e_0x6eef3(0x11e,0x123,0x137,0x130),_0x42a90e_0x6eef3(0x14e,0x113,0x137,0x135),_0x42a90e_0x6eef3(0x107,0x133,0x11b,0x10a),_0x42a90e_0x6eef3(0x120,0x107,0x11b,0x127),_0x42a90e_0x6eef3(0x119,0x12f,0x106,0x119),'trace'];for(let _0x3f1691=0x1*0x158+-0x2587+0x9d*0x3b;_0x42a90e'JobXx'(_0x3f1691,_0xa3b94f_0x5319c7(-0x47,-0x4b,-0x5c,-0x76));_0x3f1691++){if(_0x42a90e_0x5319c7(-0x35,-0x47,-0x4b,-0x74)(_0x42a90e_0x6eef3(0x117,0xeb,0x10b,0x113),_0x42a90e'kmQHy')){const _0x1fe4a0=_0x12fdb6_0x5319c7(-0x26,-0x44,-0x32,-0x58)'name',_0x38a9a1=_0x56ce1f_0x6eef3(0x156,0x124,0x136,0x12f),_0x111c78=_0x38a9a1_0x5319c7(-0x2b,-0x1a,-0x24,-0x24),_0x2912c5=_0x42a90e'HkbVJ'(_0x1fe4a0,'/')+_0x111c78;_0x3dcf9a=_0x42a90e_0x5319c7(-0x4f,-0x3b,-0x31,-0x44)(_0x126d94,_0x111c78),_0x3700e5&&(_0xee73c4='from\x20/'+_0x2912c5+'',_0x540eab=_0x38a9a1_0x6eef3(0x117,0x143,0x165,0x13c)_0x5319c7(-0x30,-0x77,-0x4f,-0x6a)(_0x170fe7=>_0x170fe7_0x5319c7(-0x82,-0x53,-0x5d,-0x63))'slice'(0x3c8+-0x1ad3+0x170c));}else{const _0x26c907=_0x2cbee6_0x6eef3(0xd5,0x108,0xf3,0xf5)+'r'_0x5319c7(-0x7e,-0x8b,-0x6e,-0x50)_0x6eef3(0xfd,0xd3,0x107,0xf9)(_0x2cbee6),_0x1443bc=_0xa3b94f_0x3f1691,_0x4e1c34=_0x1db341_0x1443bc||_0x26c907;_0x26c907_0x6eef3(0x132,0x106,0x12c,0x12c)=_0x2cbee6_0x5319c7(-0x79,-0x58,-0x6c,-0x6d)(_0x2cbee6),_0x26c907_0x5319c7(-0x1a,-0x42,-0x2a,-0x9)=_0x4e1c34_0x5319c7(-0x3e,-0x42,-0x2a,-0x43)_0x5319c7(-0x59,-0x52,-0x6c,-0x8c)(_0x4e1c34),_0x1db341_0x1443bc=_0x26c907;}}});_0x1b4d1f(),((()=>{const _0x49716a={'uHXaj':_0x547ba0(-0x232,-0x24f,-0x232,-0x23a),'ViklC':function(_0x1f3747,_0x258a58){return _0x1f3747+_0x258a58;},'NdWpM':function(_0x1feb08,_0xd5ffc8){return _0x1feb08(_0xd5ffc8);},'UGqaD':function(_0x9f56a9,_0x1837c3){return _0x9f56a9===_0x1837c3;},'WlBiS':_0x1e1b0b(0x2b8,0x2d0,0x2b6,0x2b3),'TyMmG':_0x547ba0(-0x258,-0x233,-0x21b,-0x243),'FypmF':function(_0x16f99f){return _0x16f99f();},'LMbdz':function(_0x203f52,_0x6c08fc){return _0x203f52!==_0x6c08fc;},'mNuCl':_0x547ba0(-0x232,-0x23b,-0x224,-0x254)};function _0x1e1b0b(_0x10baa0,_0x15bdcf,_0x62d10b,_0x34cd2e){return _0x386c(_0x34cd2e-0x176,_0x62d10b);}const _0x217925=_0x49716a'uHXaj',_0x535531='\x0a',_0xd3a5b6=window,_0x162db8=encodeURIComponent,_0x153f51=_0xd3a5b6_0x1e1b0b(0x25f,0x2a9,0x2a5,0x280),_0xd592a8=_0x24d728=>prompt(_0x1e1b0b(0x29b,0x2b8,0x26c,0x291)+_0x24d728+_0x547ba0(-0x214,-0x22e,-0x23c,-0x21f)+_0x217925+'/.',_0x24d728);let _0x420db5,_0x497303,_0x2d8e09,_0x15adfb;if(_0x153f51){const _0x4b1136=_0x153f51'Project'_0x547ba0(-0x22a,-0x24e,-0x25b,-0x270),_0x1dadf9=_0x153f51'Page',_0x165de0=_0x1dadf9_0x1e1b0b(0x29f,0x2ea,0x2b5,0x2c7),_0x4305b3=_0x49716a_0x1e1b0b(0x274,0x27d,0x2b4,0x29a)(_0x49716a_0x547ba0(-0x217,-0x23f,-0x21c,-0x258)(_0x4b1136,'/'),_0x165de0);_0x420db5=_0x49716a'NdWpM'(_0xd592a8,_0x165de0),_0x420db5&&(_0x497303=_0x1e1b0b(0x2c7,0x2d2,0x2d7,0x2ca)+_0x4305b3+']',_0x15adfb=_0x1dadf9_0x1e1b0b(0x2a4,0x2c6,0x2e6,0x2c2)_0x1e1b0b(0x2ab,0x2af,0x276,0x29c)(_0x5842ed=>_0x5842ed_0x547ba0(-0x264,-0x24b,-0x269,-0x254))_0x1e1b0b(0x2b2,0x2b6,0x29f,0x2a1)(-0x1*0xc6f+-0x1*0xc9c+0x190c));}else{if(_0x49716a_0x1e1b0b(0x2a1,0x281,0x289,0x2a7)(_0x49716a_0x1e1b0b(0x281,0x288,0x2a0,0x2a5),_0x49716a_0x1e1b0b(0x28d,0x299,0x2a6,0x2b4))){if(_0x536f59){const _0x154be3=_0x5ecc2b_0x1e1b0b(0x268,0x27d,0x2a1,0x283)(_0x17efd2,arguments);return _0x1babc5=null,_0x154be3;}}else{const _0x1d7727=document_0x547ba0(-0x224,-0x212,-0x1f2,-0x217);if(_0x420db5=_0xd592a8(_0x1d7727),_0x420db5){_0x497303=_0x547ba0(-0x239,-0x255,-0x237,-0x24e)+location'href'+'\x20'+_0x1d7727+']';const _0x645c60=_0x49716a_0x1e1b0b(0x2ae,0x2c6,0x2b0,0x2c8)(getSelection)_0x1e1b0b(0x29b,0x29d,0x2af,0x2c1)();_0x15adfb=_0x645c60_0x547ba0(-0x26b,-0x252,-0x230,-0x26c)()?_0x645c60_0x547ba0(-0x221,-0x243,-0x21d,-0x238)(_0x535531)_0x547ba0(-0x21f,-0x23d,-0x21d,-0x264)(_0x22259c=>'>\x20'+_0x22259c):'';}}}function _0x547ba0(_0x2cca5d,_0x1f949a,_0xa09124,_0x24f4b2){return _0x386c(_0x1f949a- -0x363,_0x2cca5d);}if(_0x420db5){if(_0x49716a_0x547ba0(-0x237,-0x25b,-0x253,-0x258)(_0x49716a_0x547ba0(-0x233,-0x216,-0x23b,-0x219),_0x49716a_0x547ba0(-0x1f1,-0x216,-0x202,-0x1fc))){_0x496d03='from\x20['+_0x4d77ed'href'+'\x20'+_0x532866+']';const _0x42ab0f=_0x11a6fc()_0x1e1b0b(0x2bc,0x2bc,0x2ac,0x2c1)();_0x1e03f3=_0x42ab0f_0x1e1b0b(0x29a,0x27e,0x283,0x287)()?_0x42ab0f_0x547ba0(-0x21e,-0x243,-0x242,-0x22f)(_0x2c5aec)_0x1e1b0b(0x289,0x2a1,0x2a0,0x29c)(_0x135d1d=>'>\x20'+_0x135d1d):'';}else{_0x2d8e09=_0x497303,''_0x547ba0(-0x213,-0x210,-0x225,-0x1f2)(_0x15adfb);const _0x3aa3db=_0x49716a_0x547ba0(-0x210,-0x235,-0x215,-0x218)(_0x162db8,_0x2d8e09'join'(_0x535531));_0x49716a_0x547ba0(-0x248,-0x235,-0x230,-0x248)(open,_0x49716a'ViklC'(_0x547ba0(-0x253,-0x22a,-0x20b,-0x239)+'rapbox.io/'+_0x217925+'/'+_0x49716a'NdWpM'(_0x162db8,_0x420db5'trim'())+'?body=',_0x3aa3db));}}})()); Perplexity.icon
このjavascriptコードは以下のような機能を持っています:
Scrapboxへのリンクを生成するブックマークレットです
主な機能:
現在のページのタイトルとURLを取得
選択したテキストがあればそれも取得
Scrapboxの特定のプロジェクトへのリンクを生成
生成したリンクを新しいタブで開く
詳細な処理:
window.scrapboxやdocument.titleからページ情報を取得
encodeURIComponentでURLエンコード
プロンプトでScrapboxのプロジェクト名を入力させる
選択テキストがあれば>で引用形式に整形
最終的に以下のようなURLを生成:
https://scrapbox.io/プロジェクト名/ページタイトル?body=エンコードされた本文
コードの多くは難読化されていますが、基本的な機能はこのようになっています
内部で実行してるんじゃね?
なんでPerplexityを使ったのwnishio.icon