mx pak1 ܕ custom.jsk֚def.json y*)executeScript.jsr&"icons\icon_16.png*R#Jicons\icon_32.png|6 Uicons\icon_48.png&k index.html7E& service.htm??HUI.js@(function(rt,localStorage){ var guid="{CD54E426-576C-4073-BFBF-61A5552A4E0F}"; var xPath=function(xpath,contextNode,doc){doc=doc||document;contextNode=contextNode||doc;return doc.evaluate(xpath,contextNode,null,9,null).singleNodeValue;}; var xPaths=function(xpath,contextNode,doc){doc=doc||document;contextNode=contextNode||doc;var N=new Array();var XPR=doc.evaluate(xpath,contextNode,null,7,null);for(var j=0;ja!C/AkPBΠʞplPVauh$hEdt k\CV< 8""qwj>Sa^ʨ~!UD՘yO9$J(@Oə2z$Z]!,;~B ˷/;`yO^DP8D=: 9PYpy=A%R[x1[,4FZ[Ew#(O)(y]tf4%6j al6&?TET< r{~1Rc"-.jv)#綒u4yl>hQ=L QHME4%\@004-j0>{eOU-K, ~LONsۧSҡz20vpD8N  o`  \-þkn3h ɇô30M0yw/ .2[wۇ+_p5A^ŭ U֭!rw=`G3;Jp ƌJj-dzc-3 tݎ ]vd#oY}s(}mC{:֊V+N53\{Ll,rS v$xhp6GUĈ"05'=EiGnmc0mЯ_D*hzЊ7^½Or=sHpkZm#$C :ҹӫ$Ό)P]kFzSvT"oK``Tv{$~|xUeo*z+Rje#sWZ p]Ѐ{_#&G4+7XaDȉ: Xb 5rUNqDITLHM,}r),F1r#I:舦RQ@@q tZ BA:N=4"1"tɞ`ݙ/ 䃣g$2)"6:JdG4̣g܆wV)Чذ* g&5Ӓh~ zS wqmo{{ĝ~jƔцYyT%, #C"(qczf8t^LQ!4DOɌ8;x΅ZvQ79Oi5 r_-E3rM5oxwz&'e:/Zovϡ,8ZGT r3,l P8,N#:(K(֣PchgU5q]/P/!Fďҙzn8`ГdNVjtRϳ a$2eC"%\lWNi"^jXe/(,ryZb?&(Bg Q|!aE2 4B輼O62 8C07cR R[xt |ח6'ٿ1<yѫH6'XV+ߒ,gV0P? èadXX}VpenqI}"(o3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zy2HCG l6aplj.VVO'|YN E#oO#XѣjJƑHO;80)H z(˩ 2b$#B{a$rodZˌTn?ӣoj}LR=}0ڒd:༆V ۃdᐴڌlט4ͬJ tdS#^5k5|_iV1Lf :wQI1-=sG'91,h 5ʣ@$y İ>dlt(mD1R%mVT?Y.91+ŋ 4N!@f}q1M䉨 Yai G]! d_K!):0J,b2B eZzTZ :m(T[ÿZ={i'P=MD؝t0VbG G`/D~wN`#ɦgsg' }$.! HନnLq@ ,؁y6=u|p6=™ \ ML8S6F3ӛA,pjɁcK"O‚XybB<<]A@G /=(`?T{zdw!FRX61y %%86ZEF,Ϻ܋NJꛬ?|av Ub"$X͵[72>>i% O(Et۽Z9d<[yiZ3.,W+xdzdd}=,x~,ߋG9ϦCHd!gnYn ނ5&g;mak o bam,Ln")P# kqf,t"U|6(mϾŏ2Cq uy9y]vHjo~M(߶Vs5^PE 5Xހ;z,Hł:@볋!x)f =?$_?!(GI j]G(6/'5]ٴ0kْ̡Rx^B~ IENDB` guidClient
域名:
列表:
service.htm (function(rt,localStorage){ var guid="{CD54E426-576C-4073-BFBF-61A5552A4E0F}"; var xPath=function(xpath,contextNode,doc){doc=doc||document;contextNode=contextNode||doc;return doc.evaluate(xpath,contextNode,null,9,null).singleNodeValue;}; var xPaths=function(xpath,contextNode,doc){doc=doc||document;contextNode=contextNode||doc;var N=new Array();var XPR=doc.evaluate(xpath,contextNode,null,7,null);for(var j=0;j/g,"\n"); },false); function loadOption(){ var value=getValue("handleList"); var handleList=value.replace(/\$\^/g,";").replace(/[\^\$]/g,"").split(/;/g); console.log(["handleList",value,handleList]); handleMenu.innerHTML=""; for(var i=0,j;j=handleList[i];i++){ option=document.createElement("option");handleMenu.appendChild(option);option.value=option.innerHTML=j; if(j==handle.value)option.setAttribute("selected","selected"); } handle.value=handleMenu.value; textarea.value=getValue(handle.value).replace(/
/g,"\n"); console.log(["完成刷新",getValue("handleList"),handleList,handleMenu]); } console.log([handle,handleMenu,textarea,save,refresh]); if(getValue("handleList")===""){ setValue("handleList","^globals$"); } save.addEventListener("click",saveStyle,false); function saveStyle(e){ var handleList=getValue("handleList"); var chandle=handle.value; var ctextarea=textarea.value.replace(/\n/g,"
"); if(chandle=="globals"){ setValue(chandle,ctextarea); loadOption(); } else if(handle.flag){ if(handleList.indexOf("^"+chandle+"$")==-1){ setValue("handleList",handleList+"^"+chandle+"$"); } setValue(chandle,ctextarea); loadOption(); }else alert("请输入正确的域名,如:www.baidu.com"); console.log([chandle,ctextarea,getValue("handleList")]); if(e=="useStyle"){ var nowtabs=browser.tabs.getCurrentTab();var postid=nowtabs.id.toString(); rt.post(postid+"custom.js","useStyle");console.log("完成发送"); } } del.addEventListener("click",function(e){ if(handle.value=="globals"){ alert("全局规则不能删除"); return; } var handleList=getValue("handleList"); handleList=handleList.replace("^"+handle.value+"$",""); setValue("handleList",handleList); setValue(handle.value); loadOption(); },false); load.addEventListener("click",function(e){ var chandle=handle.value=handleMenu.value; textarea.value=getValue(chandle).replace(/
/g,"\n"); },false); refresh.addEventListener("click",function(e){ loadOption(); },false); reset.addEventListener("click",function(e){ var comd=prompt("确认要重置吗?重置后不能恢复!输入 OK 重置",""); if(comd=="OK") { var handleList=getValue("handleList").replace(/#/g,""); handleList=handleList.split(","); for(var i=0,j;j=handleList[i];i++){ setValue(j); } setValue("handleList","^globals$");console.log(getValue("handleList")); loadOption();alert("完成重置"); } else alert("取消重置"); },false); nowuse.addEventListener("click",function(e){ saveStyle("useStyle"); },false); loadOption(); // userjs 部分 var userjsBox=xPath('//div[@id="mian"]/div[@class="userjs"]'); var localaddress=atob(RegExp("mxaddon-pkg://(.*?)/","").exec(rt.getPrivateUrl())[1]); var localAddonsDir=(/^.*\\/).exec(localaddress.replace(RegExp("/","g"),"\\")); var localaddressBox=document.createElement("div");localaddressBox.setAttribute("style","width:100%;font:12px/16px 'Arial;'"); var userjsDir=getValue("userjsDir"); localaddressBox.innerHTML=('插件目录:
'+localAddonsDir+'
'+ 'userjs目录(js文件包含中文需要UTF-8编码):
'+userjsDir+'
'+ '加载的脚本:
'); userjsBox.appendChild(localaddressBox); var userjsDirSelector=xPath('//input[@id="userjsDirSelector"]'); var userjsDirPath=xPath('//a[@id="userjsDir"]'); userjsDirSelector.addEventListener("click",function(e){ var Dir=prompt("输入你的userjs路径",getValue("userjsDir")); if(Dir) { setValue("userjsDir",Dir); userjsDirPath.setAttribute("href",Dir); userjsDirPath.innerHTML=Dir; refreshList(); } },false); console.log([userjsDirSelector,userjsDirPath]); var refreshUserjsList=xPath('//input[@id="refreshUserjsList"]'); var showList=xPath('//div[@id="showList"]'); refreshUserjsList.addEventListener("click",function(e){ refreshList(); },false); function saveJS(adr){ var address=adr; var iframe=document.createElement("iframe");iframe.setAttribute("style","position:absolute;top:0px;left:0px;width:0px;height:0px;visibility: hidden;"); iframe.addEventListener("load",function(e){ var newDoc=iframe.contentDocument; var content=window.encodeURIComponent(xPath('//body/pre',newDoc,newDoc).innerText); setValue(address,content); },false); iframe.src=address;document.documentElement.appendChild(iframe); } function refreshList(){ var userjsIframe=document.createElement("iframe");userjsIframe.setAttribute("style","position:absolute;top:0px;left:0px;width:0px;height:0px;visibility: hidden;"); userjsIframe.addEventListener("load",function(e){ var nweDoc=userjsIframe.contentDocument; var jslist=xPaths('//table[@id="list-table"]//a[@class="icon-file"]',nweDoc,nweDoc); var i,j,userjsListStart=[],userjsListEnd=[]; for(i=0;j=jslist[i];i++){ var address=decodeURIComponent(j.getAttribute("href").replace("file:///","").replace(RegExp("/","g"),"\\")); if(/\.user\.js$/.test(j.getAttribute("href"))){ userjsListEnd.push( address ); saveJS(address); }else if(/\.js$/.test(j.getAttribute("href"))){ userjsListStart.push( address ); saveJS(address); } } setValue("userjsListStart",userjsListStart.join("|")); setValue("userjsListEnd",userjsListEnd.join("|")); showList.innerHTML="  页面载入前:
"+userjsListStart.join("
")+"
  页面载入后:
"+userjsListEnd.join("
"); console.log([getValue("userjsListStart"),getValue("userjsListEnd")]); userjsIframe.parentNode.removeChild(userjsIframe); },false); userjsIframe.src=getValue("userjsDir");document.documentElement.appendChild(userjsIframe); } refreshList(); })(window.external.mxGetRuntime(),window.localStorage);