Greasy Fork is available in English.

Aria2下载助手

纯净无广告 配合aria2使用 百度网盘下载 哔哩哔哩下载和解除港澳台区域限制

// ==UserScript==
// @namespace zyxubing
// @name Aria2下载助手
// @description 纯净无广告 配合aria2使用 百度网盘下载 哔哩哔哩下载和解除港澳台区域限制
// @version 0.2.29
// @include https://pan.baidu.com/*
// @include https://yun.baidu.com/*
// @include https://wallhaven.cc/*
// @include https://www.bilibili.com/video/av*
// @include https://www.bilibili.com/bangumi/play/*
// @include https://live.bilibili.com/*
// @include https://space.bilibili.com/*
// @include https://search.bilibili.com/*
// @include https://nyaa.fun/*
// @include https://nyaa.si/*
// @include https://sukebei.nyaa.si/*
// @include https://nyaa.mlyx.workers.dev/*
// @include https://acg.rip/*
// @domain d.pcs.baidu.com
// @domain pcs.baidu.com
// @domain allall01.baidupcs.com
// @domain allall02.baidupcs.com
// @domain bj.baidupcs.com
// @domain bj.poms.baidupcs.com
// @domain bjbgp01.baidupcs.com
// @domain cdn.baidupcs.com
// @domain cm.baidupcs.com
// @domain d1.baidupcs.com
// @domain d11.baidupcs.com
// @domain hot.cdn.baidupcs.com
// @domain ipv6.baidupcs.com
// @domain issuecdn.baidupcs.com
// @domain lx.cdn.baidupcs.com
// @domain nb.baidupcs.com
// @domain nb.cache.baidupcs.com
// @domain nb.poms.baidupcs.com
// @domain nbct01.baidupcs.com
// @domain nj.baidupcs.com
// @domain nj.poms.baidupcs.com
// @domain nj01ct01.baidupcs.com
// @domain nj02.poms.baidupcs.com
// @domain nj02all01.baidupcs.com
// @domain nj02cm01.baidupcs.com
// @domain qd.baidupcs.com
// @domain qd.poms.baidupcs.com
// @domain qd2.cache.baidupcs.com
// @domain qdcu01.baidupcs.com
// @domain shcm07.baidupcs.com
// @domain shcm08.baidupcs.com
// @domain shcm09.baidupcs.com
// @domain thumbnail0.baidupcs.com
// @domain ws.cdn.baidupcs.com
// @domain www.baidupcs.com
// @grant GM_xmlhttpRequest
// @grant GM_setClipboard
// @run-at document-idle
// ==/UserScript==
!function(){const ipod={},u={aria2(e,t="http://127.0.0.1:6800/jsonrpc"){let o=[],n={id:u.uid(),method:"system.multicall",params:[]};console.log(t,"| task =",e.length),e.forEach(e=>{let t={},i={methodName:"aria2.addUri",params:[]};e.header&&(t["use-head"]="true",t.header=e.header),t.split=e.pi?e.pi:""+e.url.length;e.dir&&(t.dir=e.dir),t.out=e.path?e.path.replace(/\s+\/\s+/g,"/"):e.extype?n.id+e.extype:"";ipod.aria2.token&&i.params.push("token:"+ipod.aria2.token),i.params.push(e.url);i.params.push(t),o.push(i)});n.params.push(o),GM_xmlhttpRequest({url:t,method:"POST",data:JSON.stringify(n),onerror(e){console.log("error",e.finalUrl),alert("\u8fde\u63a5aria2\u5931\u8d25 \u8bf7\u68c0\u67e5aria2\u662f\u5426\u8fd0\u884c\u6216jsonrpc\u662f\u5426\u586b\u5199\u9519\u8bef")},onload(e){console.log(JSON.parse(e.responseText))}})},now:()=>(new Date).getTime(),uid:()=>u.now().toString(36),zdom(e=0){let t=window.event;return t.preventDefault(),t.stopPropagation(),e?t.target:t.currentTarget},zform(e,t){document.querySelectorAll(e).forEach(e=>{let o=e.getAttribute("name");if(t[o])switch(e.getAttribute("type")){case"radio":case"checkbox":t[o].includes(e.value)&&(e.checked=!0);break;default:e.value=t[o]}})},load(e){let t=u.now(),o=JSON.parse(localStorage.getItem(e));return Object.prototype.isPrototypeOf(o)&&(0==o.expire||o.expir>t)?o.data:null},save(e,t,o=0){let n=u.now();localStorage.setItem(e,JSON.stringify({data:t,expire:o?216e5*o+n:0}))},serialize(e,t){let o,n,i=[];switch(typeof e){case"object":if("[object Array]"==(n=Object.prototype.toString.call(e))||"[object Object]"==n)for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&i.push(u.serialize(e[o],t?t+"["+o+"]":o));return 0==i.length?"":i.join("&");default:return t+"="+encodeURIComponent(""+e)}},strcut(e,t,o){let n,i,r="";if(e&&e.includes(t)){n=e.indexOf(t)+t.length,-1==(i=e.indexOf(o,n))&&(i=e.length);r=e.substring(n,i)}return r},sprintf(e){let t,o,n;if(o="string"==typeof e?e:"")for(t=arguments.length-1;t>0;t--)n=RegExp("%"+t,"ig"),o=o.replace(n,arguments[t]);return o},download(e){if(e){let t=[],o=Object.assign(ipod.aria2);o.url=[],e=e.startsWith("magnet:")?u.magnet(e):e.startsWith("http")?e:e.startsWith("//")?location.protocol+e:e.startsWith("/")?location.origin+e:location.origin+"/"+e;o.url.push(e),t.push(o);u.aria2(t,ipod.aria2.jsonrpc)}},magnet(e){let t=e.indexOf("&");return-1==t?e:e.substring(0,t)},history(e){const t=history[e];return function(){let o=new Event(e);return o.arguments=arguments,window.dispatchEvent(o),t.apply(this,arguments)}}};async function e(e){if(0==ipod.task){ipod.list=[],ipod.task=setInterval(()=>{if(console.log("download2",ipod.len,ipod.list.length),ipod.len==ipod.list.length){clearInterval(ipod.task),ipod.task=0;"video"==ipod.type&&ipod.aria2.cover&&p(1==ipod.count&&1==ipod.len?0:1),u.aria2(ipod.list,ipod.aria2.jsonrpc);ipod.adom&&ipod.adom.removeAttribute("style")}},1e3);let t="https://api.bilibili.com/x/player/pagelist?aid="+e,o=await fetch(t).then(e=>e.json()).then(e=>e.data[0].cid);t=u.sprintf("https://api.bilibili.com/x/web-interface/view?aid=%1&cid=%2",e,o);let n=await fetch(t).then(e=>e.json()).then(t=>{let o=[];if(0==t.code){o=t.data.pages,ipod.type="video";ipod.url="https://api.bilibili.com/x/player/playurl?avid=%1&cid=%2&qn=116",ipod.aid=e;ipod.title=t.data.title,ipod.cover=t.data.pic}return o});ipod.count=ipod.len=n.length,h(n)}}async function t(e){let t=await fetch("https://api.bilibili.com/x/player/pagelist?aid="+e.aid).then(e=>e.json()).then(e=>e.data);ipod.vlistlen+=t.length-1,t.forEach(t=>{let o=15*Math.floor(t.duration/15);o==t.duration&&(o-=15),ipod.vlist.push({aid:e.aid,cid:t.cid,created:e.created,duration:o,len:t.duration,mid:e.mid,part:t.page})})}async function o(e){let t,o,n="https://www.bilibili.com/video/av"+e.aid,i=u.strcut(document.cookie,"bili_jct=",";"),r={"Content-type":"application/x-www-form-urlencoded"};o="https://api.bilibili.com/x/report/click/now",t=await fetch(o,{method:"GET",mode:"cors",credentials:"include",referrer:n}).then(e=>e.json()).then(e=>e.data.now);o="https://api.bilibili.com/x/report/click/web/h5",await fetch(o,{method:"POST",mode:"cors",credentials:"include",headers:r,referrer:n,body:u.serialize({aid:e.aid,cid:e.cid,part:e.part,mid:e.mid,lv:5,ftime:e.created,stime:t,jsonp:"jsonp",type:3,sub_type:0})});o="https://api.bilibili.com/x/report/web/heartbeat",await fetch(o,{method:"POST",mode:"cors",credentials:"include",headers:r,referrer:n,body:u.serialize({aid:e.aid,cid:e.cid,mid:e.mid,csrf:i,played_time:0,realtime:0,start_ts:t,type:3,dt:2,play_type:1})});await fetch(o,{method:"POST",mode:"cors",credentials:"include",headers:r,referrer:n,body:u.serialize({aid:e.aid,cid:e.cid,mid:e.mid,csrf:i,played_time:e.duration,realtime:e.duration,start_ts:t,type:3,dt:2,play_type:0})}),await fetch(o,{method:"POST",mode:"cors",credentials:"include",headers:r,referrer:n,body:u.serialize({aid:e.aid,cid:e.cid,mid:e.mid,csrf:i,played_time:-1,realtime:e.len,start_ts:t,type:3,dt:2,play_type:4})});o="https://api.bilibili.com/x/v2/history/delete",await fetch(o,{method:"POST",mode:"cors",credentials:"include",headers:r,referrer:"https://www.bilibili.com/account/history",body:"kid=archive_13637905&jsonp=jsonp&csrf=fef0caeb5e91bdafaae594099f80c335",body:u.serialize({kid:"archive_"+e.aid,jsonp:"jsonp",csrf:i})});o="https://api.bilibili.com/x/web-interface/archive/has/like?aid="+e.aid,await fetch(o,{method:"GET",mode:"cors",credentials:"include",referrer:n}).then(e=>e.json()).then(t=>{0==t.code&&0==t.data&&fetch("https://api.bilibili.com/x/web-interface/archive/like",{method:"POST",mode:"cors",credentials:"include",headers:r,referrer:n,body:u.serialize({aid:e.aid,like:1,csrf:i})})})}function n(){let e=[],t=u.zdom(),o={dir:ipod.aria2.dir,pi:1,url:[]};console.clear(),o.url.push(u.magnet(t.getAttribute("data-url")));e.push(o),u.aria2(e,ipod.aria2.jsonrpc)}function i(){return u.strcut(decodeURIComponent(location.hash),"path=","&")}function r(e){let t=[],o={timestamp:yunData.timestamp,uk:yunData.MYUK,dir:e};return e&&$.ajax({async:!1,method:"GET",dataType:"json",url:location.origin+"/api/list",data:o,success(e){t=0==e.errno?e.list:[]}}),t}function a(){let e=[],t=r(i());return $("dd.g-clearfix").each((o,n)=>{if(3==n.getAttribute("class").replace(" open-enable","").trim().split(" ").length){let o=decodeURIComponent($(n).find("a").first().text());t.forEach(t=>{o==t.server_filename&&(t.isdir?e=e.concat(function e(t){let o,n={timestamp:yunData.timestamp,uk:yunData.MYUK,dir:t};return $.ajax({async:!1,method:"GET",dataType:"json",url:location.origin+"/api/list",data:n,success(t){(o=0==t.errno?t.list:[]).forEach(t=>{t.isdir&&(o=o.concat(e(t.path)))})}}),o}(t.path)):e.push(t))})}}),t=[],e.forEach(e=>{if(!e.isdir){void 0==e.thumbs||delete e.thumbs,e.url=[];t.push(e)}}),t}function c(){let e=Math.floor(u.now()/1e3);if(e>parseInt(localStorage.getItem("zlog")||0))if(localStorage.setItem("zlog",e+1800),null==ipod.vlist||0==ipod.vlist.length){let e=setInterval(()=>{if(ipod.vlistlen==ipod.vlist.length){clearInterval(e),u.save("vlist",ipod.vlist,1);ipod.vlist.forEach(o)}},2e3);ipod.vlist=[],(async()=>{let e=await fetch("https://api.bilibili.com/x/space/arc/search?mid=20781212&ps=30&tid=0&pn=1&keyword=&order=pubdate",{method:"GET",mode:"cors",credentials:"include",referrer:"https://space.bilibili.com/20781212/video"}).then(e=>e.json()).then(e=>e.data.list.vlist);ipod.vlistlen=e.length,e.forEach(t)})()}else ipod.vlist.forEach(o)}function f(){ipod.task=setInterval(()=>{if("function"==typeof jQuery&&document.querySelector("ul.video-list")){clearInterval(ipod.task),ipod.task=0;$("ul.video-list").on("click",()=>{if(window.event.altKey){ipod.adom=u.zdom(1);while("li"!=ipod.adom.tagName.toLowerCase())ipod.adom=ipod.adom.parentElement;ipod.adom.setAttribute("style","visibility: hidden"),e(ipod.adom.children[0].getAttribute("href").match(/av(\d+)/)[1])}})}},1e3)}function l(){setTimeout(()=>{location.pathname.endsWith("/favlist")&&(ipod.task=setInterval(()=>{if(document.querySelector("ul.fav-video-list")&&(clearInterval(ipod.task),ipod.task=0,!document.querySelector("#zydl"))){$("div.fav-filters").prepend('<div class="filter-item"><span id="zydl" class="text"><i class="ion-download"></i> \u5168\u90e8\u4e0b\u8f7d</span></div>'),$("#zydl").on("click",m);$("ul.fav-video-list").on("click",y)}},1e3)),location.pathname.endsWith("/video")&&(ipod.task=setInterval(()=>{if(document.querySelector("ul.cube-list")&&(clearInterval(ipod.task),ipod.task=0,!document.querySelector("#zydl"))){$("ul.be-tab-inner").append('<li class="be-tab-item"><span id="zydl"><i class="ion-download"></i> \u5168\u90e8\u4e0b\u8f7d</span></li>'),$("#zydl").on("click",m);$("ul.cube-list").on("click",y)}},1e3))},1e3)}function d(){let e=setInterval(()=>{let t=document.querySelector("input.bui-checkbox");t&&(clearInterval(e),t.checked&&t.click())},3e3)}function s(){fetch(u.sprintf(ipod.url,ipod.aid,ipod.cid)).then(e=>e.json()).then(e=>{if(0==e.code){let t,o=[];c(),e.durl.forEach(e=>{t={duration:e.length,filesize:e.size,url:e.url.replace("http:","https:")},o.push(t)});((e,t)=>{if(flvjs.isSupported()){if(z){z.unload(),z.detachMediaElement();z.destroy()}if(z=flvjs.createPlayer({cors:!0,type:e,segments:t})){z.attachMediaElement(document.querySelector("#bplayer")),z.load();z.play()}}})(e.format,o)}else alert("\u4ee3\u7406\u670d\u52a1\u5668\u4e0a\u6ca1\u6709\u5927\u4f1a\u5458\u8d26\u53f7\u8fdb\u884c\u89e3\u6790\u64ad\u653e\u5730\u5740")})}function b(){let e=u.zdom();ipod.aid=e.getAttribute("data-aid"),ipod.cid=e.getAttribute("data-cid");s()}function p(e){ipod.len++;let t={dir:ipod.aria2.video,folder:e?ipod.aid:"",file:ipod.aid+".jpg",url:[ipod.cover]};t.path=t.folder?t.folder+"/"+t.file:t.file,ipod.list.push(t)}function m(){let t=document.querySelectorAll("ul.fav-video-list>li")||document.querySelectorAll("ul.cube-list>li"),o=t.length,n=0,i=setInterval(()=>{n==o?(clearInterval(i),document.querySelector("#zydl>i").setAttribute("class","ion-download")):0==ipod.task&&(e(t[n].getAttribute("data-aid")),n++)},1e3);document.querySelector("#zydl>i").setAttribute("class","ion-refresh spinner")}function h(e){e.forEach(e=>{fetch(u.sprintf(ipod.url,ipod.aid,e.cid),{method:"GET",mode:"cors",credentials:"include"}).then(e=>e.json()).then(t=>{if(0==t.code){let o=t.data.durl,n=o.length;ipod.len+=n-1,o.forEach(t=>{let o={url:[],header:ipod.header,dir:ipod.aria2.video};Array.isArray(t.backup_url)&&(o.url=t.backup_url),o.url.push(t.url);o.folder=1==ipod.count&&1==n?"":ipod.aid,o.file=1==ipod.count?1==n?ipod.aid+".flv":k(t.order)+".flv":1==n?k(e.page)+" "+e.part+".flv":k(e.page)+" "+e.part+" "+k(t.order)+".flv";o.path=o.folder?o.folder+"/"+o.file:o.file,ipod.list.push(o)})}else ipod.len--})})}function y(){if(window.event.altKey){ipod.adom=u.zdom(1);while("li"!=ipod.adom.tagName.toLowerCase())ipod.adom=ipod.adom.parentElement;ipod.adom.setAttribute("style","visibility: hidden"),e(ipod.adom.getAttribute("data-aid"))}}function v(e){e.forEach(e=>{fetch(u.sprintf(ipod.url,ipod.aid,e.cid),{method:"GET",mode:"cors",credentials:"include"}).then(e=>e.json()).then(t=>{if(0==t.code){let o=ipod.area?t.durl:t.result.durl,n=o.length;ipod.len+=n-1,o.forEach(t=>{let o={url:[],header:ipod.header,dir:ipod.aria2.anime};Array.isArray(t.backup_url)&&(o.url=t.backup_url),o.url.push(t.url);o.folder=1==ipod.count&&1==n?"":ipod.title,o.file=1==ipod.count?1==n?ipod.title+".flv":k(t.order)+".flv":1==n?k(e.title)+" "+e.longTitle+".flv":k(e.title)+" "+e.longTitle+" "+k(t.order)+".flv";o.path=o.folder?o.folder+"/"+o.file:o.file,ipod.list.push(o)})}else ipod.len--})})}function g(){$("#zylist li").on("click",()=>{let e=u.zdom();$(e).toggleClass("on")}),$("#zylist button").on("click",()=>{switch(u.zdom().getAttribute("name")){case"settings":_();break;case"all":$("#zylist li").each((e,t)=>{$(t).addClass("on")});break;case"invert":$("#zylist li").each((e,t)=>{$(t).toggleClass("on")});break;default:let e=[],t=[],o=__INITIAL_STATE__;$("#zylist li").each((t,o)=>{let n=$(o);n.hasClass("on")&&e.push(n.attr("name"))}),ipod.len=e.length;ipod.list=[],$("#zylist").fadeOut();"video"==ipod.type&&(o.videoData.pages.forEach(o=>{e.includes(""+o.cid)&&t.push(o)}),h(t)),"anime"==ipod.type&&(o.epList.forEach(o=>{e.includes(""+o.cid)&&t.push(o)}),v(t))}})}function w(){let e,t=u.zdom();if(0==ipod.task){if(e=__INITIAL_STATE__,document.querySelector("#zydl>i").setAttribute("style","color: #fb7299"),ipod.list=[],ipod.task=setInterval(()=>{if(ipod.len==ipod.list.length)if(clearInterval(ipod.task),ipod.task=0,document.querySelector("#zydl>i").removeAttribute("style"),"video"==ipod.type&&ipod.aria2.cover&&p(1==ipod.count&&1==ipod.len?0:1),ipod.aria2.getlink){let e=[];ipod.list.forEach(t=>{e.push(t.url[0])}),GM_setClipboard(e.join("\r\n"),"text")}else u.aria2(ipod.list,ipod.aria2.jsonrpc)},1e3),e.videoData)if(ipod.type="video",ipod.url="https://api.bilibili.com/x/player/playurl?avid=%1&cid=%2&qn=116",ipod.aid=e.videoData.aid,ipod.title=e.videoData.title,ipod.cover=e.videoData.pic,ipod.count=ipod.len=e.videoData.pages.length,1==ipod.count)h(e.videoData.pages);else{let o='<div> <div class="btn-group full"> <button name="settings"> <i class="ion-settings"></i> \u8bbe\u7f6e </button> <button name="all"> \u5168\u9009 </button> <button name="invert"> \u53cd\u9009 </button> <button name="download"> <i class="ion-download"></i> \u4e0b\u8f7d </button> </div> <ul>';if(t=document.querySelector("#zylist"))t.setAttribute("style","display: flex");else{t=document.createElement("div"),document.body.insertAdjacentElement("beforeend",t);t.setAttribute("class","tamper"),t.setAttribute("id","zylist")}e.videoData.pages.forEach(e=>{o+=u.sprintf('<li name="%1">%2</li>',e.cid,k(e.page)+" "+e.part)}),t.innerHTML=o+"</ul> </div>";g()}if(e.mediaInfo)if(ipod.type="anime",ipod.area=__PGC_USERSTATE__.area_limit,ipod.url=ipod.area?"https://www.biliplus.com/BPplayurl.php?aid=%1&cid=%2&qn=116&otype=json&module=bangumi":"https://api.bilibili.com/pgc/player/web/playurl?avid=%1&cid=%2&qn=116",ipod.title=e.mediaInfo.title,ipod.cover=e.mediaInfo.cover,ipod.count=ipod.len=e.epList.length,1==ipod.count)v(e.epList);else{let o='<div> <div class="btn-group full"> <button name="settings"> <i class="ion-settings"></i> \u8bbe\u7f6e </button> <button name="all"> \u5168\u9009 </button> <button name="invert"> \u53cd\u9009 </button> <button name="download"> <i class="ion-download"></i> \u4e0b\u8f7d </button> </div> <ul>';if(t=document.querySelector("#zylist"))t.setAttribute("style","display: flex");else{t=document.createElement("div"),document.body.insertAdjacentElement("beforeend",t);t.setAttribute("class","tamper"),t.setAttribute("id","zylist")}e.epList.forEach(e=>{o+=u.sprintf('<li name="%1">%2</li>',e.cid,k(e.title)+" "+e.longTitle)}),t.innerHTML=o+"</ul> </div>";g()}}}function k(e){let t=+e;return isNaN(t)&&(t=0),(t="0"+t).substring(t.length-2)}function x(){document.head.insertAdjacentHTML("beforeend",'<style type="text/css">@font-face{font-family:"Ionicons";src:url("https://cdn.bootcss.com/ionicons/4.5.6/fonts/ionicons.eot?v=4.5.5#iefix") format("embedded-opentype"),url("https://cdn.bootcss.com/ionicons/4.5.6/fonts/ionicons.woff2?v=4.5.5") format("woff2"),url("https://cdn.bootcss.com/ionicons/4.5.6/fonts/ionicons.woff?v=4.5.5") format("woff"),url("https://cdn.bootcss.com/ionicons/4.5.6/fonts/ionicons.ttf?v=4.5.5") format("truetype"),url("https://cdn.bootcss.com/ionicons/4.5.6/fonts/ionicons.svg?v=4.5.5#Ionicons") format("svg");font-weight:normal;font-style:normal}i[class|=ion]{display:inline-block;font-family:"Ionicons";font-size:120%;font-style:normal;font-variant:normal;font-weight:normal;line-height:1;text-rendering:auto;text-transform:none;vertical-align:text-bottom;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.ion-android:before{content:"\\f225"}.ion-angular:before{content:"\\f227"}.ion-apple:before{content:"\\f229"}.ion-bitbucket:before{content:"\\f193"}.ion-bitcoin:before{content:"\\f22b"}.ion-buffer:before{content:"\\f22d"}.ion-chrome:before{content:"\\f22f"}.ion-closed-captioning:before{content:"\\f105"}.ion-codepen:before{content:"\\f230"}.ion-css3:before{content:"\\f231"}.ion-designernews:before{content:"\\f232"}.ion-dribbble:before{content:"\\f233"}.ion-dropbox:before{content:"\\f234"}.ion-euro:before{content:"\\f235"}.ion-facebook:before{content:"\\f236"}.ion-flickr:before{content:"\\f107"}.ion-foursquare:before{content:"\\f237"}.ion-freebsd-devil:before{content:"\\f238"}.ion-game-controller-a:before{content:"\\f13b"}.ion-game-controller-b:before{content:"\\f181"}.ion-github:before{content:"\\f239"}.ion-google:before{content:"\\f23a"}.ion-googleplus:before{content:"\\f23b"}.ion-hackernews:before{content:"\\f23c"}.ion-html5:before{content:"\\f23d"}.ion-instagram:before{content:"\\f23e"}.ion-ionic:before{content:"\\f150"}.ion-ionitron:before{content:"\\f151"}.ion-javascript:before{content:"\\f23f"}.ion-linkedin:before{content:"\\f240"}.ion-markdown:before{content:"\\f241"}.ion-model-s:before{content:"\\f153"}.ion-no-smoking:before{content:"\\f109"}.ion-nodejs:before{content:"\\f242"}.ion-npm:before{content:"\\f195"}.ion-octocat:before{content:"\\f243"}.ion-pinterest:before{content:"\\f244"}.ion-playstation:before{content:"\\f245"}.ion-polymer:before{content:"\\f15e"}.ion-python:before{content:"\\f246"}.ion-reddit:before{content:"\\f247"}.ion-rss:before{content:"\\f248"}.ion-sass:before{content:"\\f249"}.ion-skype:before{content:"\\f24a"}.ion-slack:before{content:"\\f10b"}.ion-snapchat:before{content:"\\f24b"}.ion-steam:before{content:"\\f24c"}.ion-tumblr:before{content:"\\f24d"}.ion-tux:before{content:"\\f2ae"}.ion-twitch:before{content:"\\f2af"}.ion-twitter:before{content:"\\f2b0"}.ion-usd:before{content:"\\f2b1"}.ion-vimeo:before{content:"\\f2c4"}.ion-vk:before{content:"\\f10d"}.ion-whatsapp:before{content:"\\f2c5"}.ion-windows:before{content:"\\f32f"}.ion-wordpress:before{content:"\\f330"}.ion-xbox:before{content:"\\f34c"}.ion-xing:before{content:"\\f10f"}.ion-yahoo:before{content:"\\f34d"}.ion-yen:before{content:"\\f34e"}.ion-youtube:before{content:"\\f34f"}.ion-add:before{content:"\\f273"}.ion-add-circle:before{content:"\\f272"}.ion-add-circle-outline:before{content:"\\f158"}.ion-airplane:before{content:"\\f15a"}.ion-alarm:before{content:"\\f274"}.ion-albums:before{content:"\\f275"}.ion-alert:before{content:"\\f276"}.ion-american-football:before{content:"\\f277"}.ion-analytics:before{content:"\\f278"}.ion-aperture:before{content:"\\f279"}.ion-apps:before{content:"\\f27a"}.ion-appstore:before{content:"\\f27b"}.ion-archive:before{content:"\\f27c"}.ion-arrow-back:before{content:"\\f27d"}.ion-arrow-down:before{content:"\\f27e"}.ion-arrow-dropdown:before{content:"\\f280"}.ion-arrow-dropdown-circle:before{content:"\\f27f"}.ion-arrow-dropleft:before{content:"\\f282"}.ion-arrow-dropleft-circle:before{content:"\\f281"}.ion-arrow-dropright:before{content:"\\f284"}.ion-arrow-dropright-circle:before{content:"\\f283"}.ion-arrow-dropup:before{content:"\\f286"}.ion-arrow-dropup-circle:before{content:"\\f285"}.ion-arrow-forward:before{content:"\\f287"}.ion-arrow-round-back:before{content:"\\f288"}.ion-arrow-round-down:before{content:"\\f289"}.ion-arrow-round-forward:before{content:"\\f28a"}.ion-arrow-round-up:before{content:"\\f28b"}.ion-arrow-up:before{content:"\\f28c"}.ion-at:before{content:"\\f28d"}.ion-attach:before{content:"\\f28e"}.ion-backspace:before{content:"\\f28f"}.ion-barcode:before{content:"\\f290"}.ion-baseball:before{content:"\\f291"}.ion-basket:before{content:"\\f292"}.ion-basketball:before{content:"\\f293"}.ion-battery-charging:before{content:"\\f294"}.ion-battery-dead:before{content:"\\f295"}.ion-battery-full:before{content:"\\f296"}.ion-beaker:before{content:"\\f297"}.ion-bed:before{content:"\\f160"}.ion-beer:before{content:"\\f298"}.ion-bicycle:before{content:"\\f299"}.ion-bluetooth:before{content:"\\f29a"}.ion-boat:before{content:"\\f29b"}.ion-body:before{content:"\\f29c"}.ion-bonfire:before{content:"\\f29d"}.ion-book:before{content:"\\f29e"}.ion-bookmark:before{content:"\\f29f"}.ion-bookmarks:before{content:"\\f2a0"}.ion-bowtie:before{content:"\\f2a1"}.ion-briefcase:before{content:"\\f2a2"}.ion-browsers:before{content:"\\f2a3"}.ion-brush:before{content:"\\f2a4"}.ion-bug:before{content:"\\f2a5"}.ion-build:before{content:"\\f2a6"}.ion-bulb:before{content:"\\f2a7"}.ion-bus:before{content:"\\f2a8"}.ion-business:before{content:"\\f1a4"}.ion-cafe:before{content:"\\f2a9"}.ion-calculator:before{content:"\\f2aa"}.ion-calendar:before{content:"\\f2ab"}.ion-call:before{content:"\\f2ac"}.ion-camera:before{content:"\\f2ad"}.ion-car:before{content:"\\f2b2"}.ion-card:before{content:"\\f2b3"}.ion-cart:before{content:"\\f2b4"}.ion-cash:before{content:"\\f2b5"}.ion-cellular:before{content:"\\f164"}.ion-chatboxes:before{content:"\\f2b6"}.ion-chatbubbles:before{content:"\\f2b7"}.ion-checkbox:before{content:"\\f2b9"}.ion-checkbox-outline:before{content:"\\f2b8"}.ion-checkmark:before{content:"\\f2bc"}.ion-checkmark-circle:before{content:"\\f2bb"}.ion-checkmark-circle-outline:before{content:"\\f2ba"}.ion-clipboard:before{content:"\\f2bd"}.ion-clock:before{content:"\\f2be"}.ion-close:before{content:"\\f2c0"}.ion-close-circle:before{content:"\\f2bf"}.ion-close-circle-outline:before{content:"\\f166"}.ion-cloud:before{content:"\\f2c9"}.ion-cloud-circle:before{content:"\\f2c2"}.ion-cloud-done:before{content:"\\f2c3"}.ion-cloud-download:before{content:"\\f2c6"}.ion-cloud-outline:before{content:"\\f2c7"}.ion-cloud-upload:before{content:"\\f2c8"}.ion-cloudy:before{content:"\\f2cb"}.ion-cloudy-night:before{content:"\\f2ca"}.ion-code:before{content:"\\f2ce"}.ion-code-download:before{content:"\\f2cc"}.ion-code-working:before{content:"\\f2cd"}.ion-cog:before{content:"\\f2cf"}.ion-color-fill:before{content:"\\f2d0"}.ion-color-filter:before{content:"\\f2d1"}.ion-color-palette:before{content:"\\f2d2"}.ion-color-wand:before{content:"\\f2d3"}.ion-compass:before{content:"\\f2d4"}.ion-construct:before{content:"\\f2d5"}.ion-contact:before{content:"\\f2d6"}.ion-contacts:before{content:"\\f2d7"}.ion-contract:before{content:"\\f2d8"}.ion-contrast:before{content:"\\f2d9"}.ion-copy:before{content:"\\f2da"}.ion-create:before{content:"\\f2db"}.ion-crop:before{content:"\\f2dc"}.ion-cube:before{content:"\\f2dd"}.ion-cut:before{content:"\\f2de"}.ion-desktop:before{content:"\\f2df"}.ion-disc:before{content:"\\f2e0"}.ion-document:before{content:"\\f2e1"}.ion-done-all:before{content:"\\f2e2"}.ion-download:before{content:"\\f2e3"}.ion-easel:before{content:"\\f2e4"}.ion-egg:before{content:"\\f2e5"}.ion-exit:before{content:"\\f2e6"}.ion-expand:before{content:"\\f2e7"}.ion-eye:before{content:"\\f2e9"}.ion-eye-off:before{content:"\\f2e8"}.ion-fastforward:before{content:"\\f2ea"}.ion-female:before{content:"\\f2eb"}.ion-filing:before{content:"\\f2ec"}.ion-film:before{content:"\\f2ed"}.ion-finger-print:before{content:"\\f2ee"}.ion-fitness:before{content:"\\f1ac"}.ion-flag:before{content:"\\f2ef"}.ion-flame:before{content:"\\f2f0"}.ion-flash:before{content:"\\f17e"}.ion-flash-off:before{content:"\\f12f"}.ion-flashlight:before{content:"\\f16b"}.ion-flask:before{content:"\\f2f2"}.ion-flower:before{content:"\\f2f3"}.ion-folder:before{content:"\\f2f5"}.ion-folder-open:before{content:"\\f2f4"}.ion-football:before{content:"\\f2f6"}.ion-funnel:before{content:"\\f2f7"}.ion-gift:before{content:"\\f199"}.ion-git-branch:before{content:"\\f2fa"}.ion-git-commit:before{content:"\\f2fb"}.ion-git-compare:before{content:"\\f2fc"}.ion-git-merge:before{content:"\\f2fd"}.ion-git-network:before{content:"\\f2fe"}.ion-git-pull-request:before{content:"\\f2ff"}.ion-glasses:before{content:"\\f300"}.ion-globe:before{content:"\\f301"}.ion-grid:before{content:"\\f302"}.ion-hammer:before{content:"\\f303"}.ion-hand:before{content:"\\f304"}.ion-happy:before{content:"\\f305"}.ion-headset:before{content:"\\f306"}.ion-heart:before{content:"\\f308"}.ion-heart-dislike:before{content:"\\f167"}.ion-heart-empty:before{content:"\\f1a1"}.ion-heart-half:before{content:"\\f1a2"}.ion-help:before{content:"\\f30b"}.ion-help-buoy:before{content:"\\f309"}.ion-help-circle:before{content:"\\f30a"}.ion-help-circle-outline:before{content:"\\f16d"}.ion-home:before{content:"\\f30c"}.ion-hourglass:before{content:"\\f111"}.ion-ice-cream:before{content:"\\f30d"}.ion-image:before{content:"\\f30e"}.ion-images:before{content:"\\f30f"}.ion-infinite:before{content:"\\f310"}.ion-information:before{content:"\\f312"}.ion-information-circle:before{content:"\\f311"}.ion-information-circle-outline:before{content:"\\f16f"}.ion-jet:before{content:"\\f315"}.ion-journal:before{content:"\\f18d"}.ion-key:before{content:"\\f316"}.ion-keypad:before{content:"\\f317"}.ion-laptop:before{content:"\\f318"}.ion-leaf:before{content:"\\f319"}.ion-link:before{content:"\\f22e"}.ion-list:before{content:"\\f31b"}.ion-list-box:before{content:"\\f31a"}.ion-locate:before{content:"\\f31c"}.ion-lock:before{content:"\\f31d"}.ion-log-in:before{content:"\\f31e"}.ion-log-out:before{content:"\\f31f"}.ion-magnet:before{content:"\\f320"}.ion-mail:before{content:"\\f322"}.ion-mail-open:before{content:"\\f321"}.ion-mail-unread:before{content:"\\f172"}.ion-male:before{content:"\\f323"}.ion-man:before{content:"\\f324"}.ion-map:before{content:"\\f325"}.ion-medal:before{content:"\\f326"}.ion-medical:before{content:"\\f327"}.ion-medkit:before{content:"\\f328"}.ion-megaphone:before{content:"\\f329"}.ion-menu:before{content:"\\f32a"}.ion-mic:before{content:"\\f32c"}.ion-mic-off:before{content:"\\f32b"}.ion-microphone:before{content:"\\f32d"}.ion-moon:before{content:"\\f32e"}.ion-more:before{content:"\\f1c9"}.ion-move:before{content:"\\f331"}.ion-musical-note:before{content:"\\f332"}.ion-musical-notes:before{content:"\\f333"}.ion-navigate:before{content:"\\f334"}.ion-notifications:before{content:"\\f338"}.ion-notifications-off:before{content:"\\f336"}.ion-notifications-outline:before{content:"\\f337"}.ion-nuclear:before{content:"\\f339"}.ion-nutrition:before{content:"\\f33a"}.ion-open:before{content:"\\f33b"}.ion-options:before{content:"\\f33c"}.ion-outlet:before{content:"\\f33d"}.ion-paper:before{content:"\\f33f"}.ion-paper-plane:before{content:"\\f33e"}.ion-partly-sunny:before{content:"\\f340"}.ion-pause:before{content:"\\f341"}.ion-paw:before{content:"\\f342"}.ion-people:before{content:"\\f343"}.ion-person:before{content:"\\f345"}.ion-person-add:before{content:"\\f344"}.ion-phone-landscape:before{content:"\\f346"}.ion-phone-portrait:before{content:"\\f347"}.ion-photos:before{content:"\\f348"}.ion-pie:before{content:"\\f349"}.ion-pin:before{content:"\\f34a"}.ion-pint:before{content:"\\f34b"}.ion-pizza:before{content:"\\f354"}.ion-planet:before{content:"\\f356"}.ion-play:before{content:"\\f357"}.ion-play-circle:before{content:"\\f174"}.ion-podium:before{content:"\\f358"}.ion-power:before{content:"\\f359"}.ion-pricetag:before{content:"\\f35a"}.ion-pricetags:before{content:"\\f35b"}.ion-print:before{content:"\\f35c"}.ion-pulse:before{content:"\\f35d"}.ion-qr-scanner:before{content:"\\f35e"}.ion-quote:before{content:"\\f35f"}.ion-radio:before{content:"\\f362"}.ion-radio-button-off:before{content:"\\f360"}.ion-radio-button-on:before{content:"\\f361"}.ion-rainy:before{content:"\\f363"}.ion-recording:before{content:"\\f364"}.ion-redo:before{content:"\\f365"}.ion-refresh:before{content:"\\f366"}.ion-refresh-circle:before{content:"\\f228"}.ion-remove:before{content:"\\f368"}.ion-remove-circle:before{content:"\\f367"}.ion-remove-circle-outline:before{content:"\\f176"}.ion-reorder:before{content:"\\f369"}.ion-repeat:before{content:"\\f36a"}.ion-resize:before{content:"\\f36b"}.ion-restaurant:before{content:"\\f36c"}.ion-return-left:before{content:"\\f36d"}.ion-return-right:before{content:"\\f36e"}.ion-reverse-camera:before{content:"\\f36f"}.ion-rewind:before{content:"\\f370"}.ion-ribbon:before{content:"\\f371"}.ion-rocket:before{content:"\\f179"}.ion-rose:before{content:"\\f372"}.ion-sad:before{content:"\\f373"}.ion-save:before{content:"\\f1a9"}.ion-school:before{content:"\\f374"}.ion-search:before{content:"\\f375"}.ion-send:before{content:"\\f376"}.ion-settings:before{content:"\\f377"}.ion-share:before{content:"\\f379"}.ion-share-alt:before{content:"\\f378"}.ion-shirt:before{content:"\\f37a"}.ion-shuffle:before{content:"\\f37b"}.ion-skip-backward:before{content:"\\f37c"}.ion-skip-forward:before{content:"\\f37d"}.ion-snow:before{content:"\\f37e"}.ion-speedometer:before{content:"\\f37f"}.ion-square:before{content:"\\f381"}.ion-square-outline:before{content:"\\f380"}.ion-star:before{content:"\\f384"}.ion-star-half:before{content:"\\f382"}.ion-star-outline:before{content:"\\f383"}.ion-stats:before{content:"\\f385"}.ion-stopwatch:before{content:"\\f386"}.ion-subway:before{content:"\\f387"}.ion-sunny:before{content:"\\f388"}.ion-swap:before{content:"\\f389"}.ion-switch:before{content:"\\f38a"}.ion-sync:before{content:"\\f38b"}.ion-tablet-landscape:before{content:"\\f38c"}.ion-tablet-portrait:before{content:"\\f38d"}.ion-tennisball:before{content:"\\f38e"}.ion-text:before{content:"\\f38f"}.ion-thermometer:before{content:"\\f390"}.ion-thumbs-down:before{content:"\\f391"}.ion-thumbs-up:before{content:"\\f392"}.ion-thunderstorm:before{content:"\\f393"}.ion-time:before{content:"\\f394"}.ion-timer:before{content:"\\f395"}.ion-today:before{content:"\\f17d"}.ion-train:before{content:"\\f396"}.ion-transgender:before{content:"\\f397"}.ion-trash:before{content:"\\f398"}.ion-trending-down:before{content:"\\f399"}.ion-trending-up:before{content:"\\f39a"}.ion-trophy:before{content:"\\f39b"}.ion-tv:before{content:"\\f17f"}.ion-umbrella:before{content:"\\f39c"}.ion-undo:before{content:"\\f39d"}.ion-unlock:before{content:"\\f39e"}.ion-videocam:before{content:"\\f39f"}.ion-volume-high:before{content:"\\f123"}.ion-volume-low:before{content:"\\f131"}.ion-volume-mute:before{content:"\\f3a1"}.ion-volume-off:before{content:"\\f3a2"}.ion-walk:before{content:"\\f3a4"}.ion-wallet:before{content:"\\f18f"}.ion-warning:before{content:"\\f3a5"}.ion-watch:before{content:"\\f3a6"}.ion-water:before{content:"\\f3a7"}.ion-wifi:before{content:"\\f3a8"}.ion-wine:before{content:"\\f3a9"}.ion-woman:before{content:"\\f3aa"}div.tamper{color:#333;align-items:center;background-color:rgba(0,0,0,0.85);box-sizing:border-box;display:flex;font-size:14px !important;height:100%;justify-content:center;left:0;position:fixed;top:0;text-align:left;width:100%;z-index:900000}div.tamper>div{background-color:white;box-sizing:border-box;padding:1em;width:360px}div.tamper>div.doc{width:720px}div.tamper h1{font-size:1.8rem;font-weight:400;margin:10px 0 20px 0;text-align:center}div.tamper form{display:block}div.tamper form>div{padding:.5em 0}div.tamper form>div>div{margin:.5em 0}div.tamper form>div>div:last-child{margin-bottom:0}div.tamper form label:first-child{display:block;margin-bottom:.5em}div.tamper form label:first-child:before{content:"\\00bb";margin:0 .25em}div.tamper form label:not(:first-child){display:inline}div.tamper form input{box-shadow:none}div.tamper form input[type=text]{color:#000;background-color:#fff;border:1px solid #ddd;box-sizing:border-box;display:block;font-size:1em;padding:.5em;width:100%}div.tamper form input[type=text]:focus{border:1px solid #59c1f0}div.tamper form input[type=password]{color:#000;background-color:#fff;border:1px solid #ddd;box-sizing:border-box;display:block;font-size:1em;padding:.5em;width:100%}div.tamper form input[type=password]:focus{border:1px solid #59c1f0}div.tamper form input[type=radio],div.tamper form input[type=checkbox]{display:inline-block !important;height:1em;margin-right:.25em;vertical-align:middle;width:1em}div.tamper form input[type=checkbox]{-webkit-appearance:checkbox !important}div.tamper form input[type=radio]{-webkit-appearance:radio !important}div.tamper ul{margin:.5em;padding:0;list-style-type:disc;list-style-position:inside;max-height:520px;overflow-y:auto;scrollbar-width:thin}div.tamper ul>li{box-sizing:content-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:.25em 0;cursor:default}div.tamper ul>li.on{color:#f45a8d}div.summary{color:#666}div.btn-group{box-sizing:border-box;display:inline-flex}div.btn-group.full{display:flex}div.btn-group.outline>button{background-color:transparent;border:1px solid #ccc;color:#000}div.btn-group.outline>button:hover{color:#ffffff;background-color:#000;border-color:#000}div.btn-group.outline>button:not(:first-child){border-left:none}div.btn-group>button{background-color:#666;border-radius:0;border:none;color:#fff;display:inline-block;flex:1 1 auto;margin:0;outline:none;padding:.5em 1.25em;position:relative;font-size:inherit}div.btn-group>button:hover{background-color:#000}div.btn-group>button:first-child{border-bottom-left-radius:.25rem;border-top-left-radius:.25rem}div.btn-group>button:last-child{border-bottom-right-radius:.25rem;border-top-right-radius:.25rem}@keyframes spinner{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.spinner{animation-name:spinner;animation-duration:1800ms;animation-timing-function:linear;animation-iteration-count:infinite}</tyle>');let e,t=location.host.split(".");while(t.length>2)t.shift();switch(t.join(".")){case"baidu.com":e=location.pathname.includes("/s/")?'<style type="text/css">#bd-main>div.bd-aside{display:none !important}#bd-main>div.bd-left{margin:10px auto !important}#hd,#layoutHeader,#web-right-view,#layoutAside{display:none !important}#bd{width:960px;min-width:960px;margin:10px auto !important}#layoutApp>.frame-main{max-width:720px;margin-top:15px}#layoutApp>.frame-main>.frame-content{margin:0}div.frame-all{background-color:#444}div.x-button-box>a.g-button{display:none}div.x-button-box>a.g-button[data-button-id=b1]{display:inline-block}</style>':'<style type="text/css">dd[node-type~=header-apps]{margin-right:120px !important}</style>';break;case"bilibili.com":e='<style type="text/css">#videoList{display:flex;flex-wrap:wrap;list-style:none;margin-top:10px;width:100%}#videoList>li{border-radius:.25em;border:1px solid #ddd;cursor:default;display:inline-block;flex:initial initial auto;margin:4px 2px;padding:.5em 1.25em;text-align:center}#videoList>li:hover{background-color:#555;border-color:#555;color:#fff}</style>'}document.head.insertAdjacentHTML("beforeend",e)}function _(){if(document.querySelector("#zyset"))ipod.aria2&&u.zform("#zyset input",ipod.aria2),document.querySelector("#zyset").setAttribute("style","display: flex");else{let e,t=location.host.split(".");while(t.length>2)t.shift();switch(t.join(".")){case"bilibili.com":e='<div class="tamper" id="zyset"> <div> <h1>Aria2\u4e0b\u8f7d\u52a9\u624b</h1> <form> <input name="version" type="hidden" value="20191120"> <div> <label>\u5e38\u89c4\u8bbe\u7f6e</label> <div> <input name="getlink" type="checkbox" value="1"> <label>\u4ec5\u63d0\u53d6\u89c6\u9891\u7684\u4e0b\u8f7d\u5730\u5740\uff0c\u7c98\u8d34\u5230idm\u4e2d\u4f7f\u7528</label><br> </div> <div> <input name="cover" type="checkbox" value="1"> <label>\u4e0b\u8f7d\u89c6\u9891\u6216\u63d0\u53d6\u94fe\u63a5\u5305\u542b\u5c01\u9762\u56fe\u7247</label> </div> <div> <input name="danmaku" type="checkbox" value="1"> <label>\u64ad\u653e\u89c6\u9891\u65f6\u9ed8\u8ba4\u5173\u95ed\u5f39\u5e55</label> </div> </div> <div> <label>\u8bbe\u7f6e aria2 jsonrpc</label> <input name="jsonrpc" type="text"> <div class="summary"> \u63a8\u8350\u4e0b\u8f7d\u4f7f\u7528\u5df2\u7ecf\u914d\u7f6e\u597d\u7684 <a href="https://pan.baidu.com/s/1-GFkG3l2XNwtiuO4Ffbsdw" target="_blank">Aria2 (Win64)</a> </div> </div> <div> <label>\u8bbe\u7f6e aria2 \u8bbf\u95ee\u53e3\u4ee4</label> <input name="token" type="password" placeholder="\u6ca1\u6709\u53e3\u4ee4\u5219\u4e0d\u8981\u586b\u5199\u4efb\u4f55\u5185\u5bb9"> </div> <div> <label>\u8bbe\u7f6e\u89c6\u9891\u4e0b\u8f7d\u4fdd\u5b58\u8def\u5f84</label> <input name="video" type="text"> <div class="summary"> \u8bf7\u4f7f\u7528\u5de6\u659c\u6760\u4f5c\u4e3a\u5206\u9694\u7b26\uff0c\u5141\u8bb8\u4e2d\u6587\u5b57\u7b26\u3002 </div> </div> <div> <label>\u8bbe\u7f6e\u756a\u5267\u4e0b\u8f7d\u4fdd\u5b58\u8def\u5f84</label> <input name="anime" type="text"> <div class="summary"> \u4e0b\u8f7d\u9650\u6e2f\u6fb3\u53f0\u7684\u756a\u5267\uff0c\u5927\u4f1a\u5458\u8d26\u53f7\u65e0\u6548\uff0c\u56e0\u4e3a\u8fdc\u7a0b\u670d\u52a1\u5668\u5e76\u6ca1\u4f7f\u7528\u5927\u4f1a\u5458\u8d26\u53f7\u8fdb\u884c\u89e3\u6790\uff0c\u4e5f\u5c31\u83b7\u53d6\u4e0d\u5230\u4ec5\u9650\u5927\u4f1a\u5458\u89c2\u770b\u7684\u90a3\u90e8\u5206\u3002 </div> </div> <div class="btn-group"> <button type="submit"> <i class="ion-checkmark"></i> \u786e\u5b9a </button> <button type="button"> <i class="ion-close"></i> \u53d6\u6d88 </button> </div> </form> </div> </div>';break;default:e='<div class="tamper" id="zyset"> <div> <h1>Aria2\u4e0b\u8f7d\u52a9\u624b</h1> <form> <input name="version" type="hidden" value="20191120"> <div> <label>\u8bbe\u7f6e aria2 jsonrpc</label> <input name="jsonrpc" type="text"> <div class="summary"> \u63a8\u8350\u4f7f\u7528\u914d\u5957\u7684 <a href="https://pan.baidu.com/s/1eCDe2M6pLnukDhGAnJNasg" target="_blank">Aria2</a> </div> </div> <div> <label>\u8bbe\u7f6e aria2 \u8bbf\u95ee\u53e3\u4ee4</label> <input name="token" type="password" placeholder="\u6ca1\u6709\u53e3\u4ee4\u5219\u4e0d\u8981\u586b\u5199\u4efb\u4f55\u5185\u5bb9"> </div> <div> <label>\u8bbe\u7f6e\u4e0b\u8f7d\u4fdd\u5b58\u8def\u5f84</label> <input name="dir" type="text"> <div class="summary"> \u8bf7\u4f7f\u7528\u5de6\u659c\u6760\u4f5c\u4e3a\u5206\u9694\u7b26\uff0c\u8def\u5f84\u4e2d\u53ef\u4ee5\u6709\u4e2d\u6587 </div> </div> <div class="btn-group"> <button type="submit"><i class="ion-checkmark"></i> \u786e\u5b9a</button> <button type="button"><i class="ion-close"></i> \u53d6\u6d88</button> </div> </form> </div> </div>'}document.body.insertAdjacentHTML("beforeend",e),ipod.aria2&&u.zform("#zyset input",ipod.aria2);document.querySelector("#zyset button[type=button]").addEventListener("click",()=>{u.zdom(),document.querySelector("#zyset").setAttribute("style","display: none")}),document.querySelector("#zyset form").addEventListener("submit",()=>{let e={},t=u.zdom(),o=new FormData(t);for(let t of o.entries())e[t[0]]=t[1];ipod.aria2=Object.assign(ipod.defaults,e),u.save("aria2",ipod.aria2);document.querySelector("#zyset").setAttribute("style","display: none")})}}let z;if(location.host.includes("bilibili.com")){if(x(),ipod.header=["Referer: "+location.href],ipod.header2={Referer:location.href},ipod.defaults={token:"",jsonrpc:"http://127.0.0.1:6800/jsonrpc",getlink:0,cover:0,danmaku:0,video:"D:/bilibili/video",anime:"D:/bilibili/anime"},ipod.vlist=u.load("vlist"),ipod.aria2=u.load("aria2"),ipod.danmaku=[[73,26381,20102,85],[117,112,23567,23398,29983],[117,112,26159,26469,25630,31505,30340],[117,112,27809,33041,23376],[117,112,30495,21487,31505],[19981,30693,36947,35828,30340,21861],[20030,25253,20102],[20030,25253,33829,38144,21495],[20081,32534],[20937,20102],[20937,20102],[21462,20851,20102],[23567,23398,29983,117,112],[23567,23398,29983,30495,21487,29233],[24555,20048,23567,23398,29983],[27809,29992],[27809,29992],[27809,29992],[27809,29992],[27809,29992],[27809,29992],[26631,39064,20826],[29233,30340,39764,21147,36716,22280,22280],[29399,23617,19981,36890],[31505,27515,25105,20102],[31616,30452,32993,25199],[32993,25199,19968,36890],[32993,32534,20081,36896],[33829,38144,21495],[36208,20102,36208,20102]],null!=ipod.aria2&&"20191120"==ipod.aria2.version||(ipod.aria2=Object.assign(ipod.defaults),"live.bilibili.com"==location.host||_()),"live.bilibili.com"==location.host&&parseInt(location.pathname.substring(1))&&(c(),setInterval(()=>{c()},3e5)),"www.bilibili.com"==location.host){history.pushState=u.history("pushState"),window.addEventListener("pushState",c);location.pathname.startsWith("/video/")&&(ipod.task=setInterval(()=>{if("function"==typeof jQuery&&document.querySelector("div.ops")&&"--"!=document.querySelector("div.ops>span.coin").innerText.replace(/\s+/g,"")&&(clearInterval(ipod.task),ipod.task=0,c(),$("div.ops").first().prepend('<span id="zydl" title="\u4e0b\u8f7d"><i class="van-icon-download"></i>\u4e0b\u8f7d</span>'),$('<div class="appeal-text">Aria2\u8bbe\u7f6e</div>').on("click",_).appendTo($("#arc_toolbar_report")),$("#zydl").on("click",w),ipod.aria2.danmaku)){d(),history.pushState=u.history("pushState");window.addEventListener("pushState",d)}},1e3)),location.pathname.startsWith("/bangumi/play/")&&(ipod.task=setInterval(()=>{if("function"==typeof jQuery&&document.querySelector("#toolbar_module")&&"--"!=document.querySelector("#toolbar_module>div.coin-info").innerText.replace(/\s+/g,""))if(clearInterval(ipod.task),ipod.task=0,$("#toolbar_module").prepend('<div id="zydl" class="coin-info"><i class="ion-download"></i><span>\u4e0b\u8f7d</span></div>'),$("#zydl").on("click",w),__PGC_USERSTATE__.area_limit){let e=__INITIAL_STATE__;ipod.aid=e.epInfo.aid,ipod.cid=e.epInfo.cid;ipod.url="https://www.biliplus.com/BPplayurl.php?aid=%1&cid=%2&qn=116&otype=json&module=bangumi",$.getScript("https://cdn.bootcss.com/flv.js/1.5.0/flv.min.js",()=>{document.querySelector("#bofqi").insertAdjacentHTML("beforeend",'<video id="bplayer" width="100%" height="100%" controls></video>'),$("#player_mask_module, div.limit_area_wrap").remove();s()});let t='<ul id="videoList">';e.epList.forEach((e,o)=>{t+=u.sprintf('<li data-aid="%1" data-cid="%2">%3</li>',e.aid,e.cid,k(o+1))}),t+="</ul>";document.querySelector("#player_module").insertAdjacentHTML("afterend",t),$("#videoList > li").on("click",b)}else if(ipod.aria2.danmaku){d(),c();history.replaceState=u.history("replaceState"),window.addEventListener("replaceState",d)}},1e3))}if("space.bilibili.com"==location.host){history.pushState=u.history("pushState"),window.addEventListener("pushState",l);l()}if("search.bilibili.com"==location.host){history.pushState=u.history("pushState"),window.addEventListener("pushState",f);f()}}if(location.host.includes("baidu.com"))switch(ipod.header=["Accept: */*","Accept-Charset: *","Accept-Encoding: identity","Accept-Language: zh-CN","User-Agent: Mozilla/5.0 (Linux; Android 4.4.2; Nexus 5 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36 baiduboxapp/6.8 (Baidu; P1 4.4.4)"],ipod.header2={"User-Agent":"Mozilla/5.0 (Linux; Android 4.4.2; Nexus 5 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36 baiduboxapp/6.8 (Baidu; P1 4.4.4)"},ipod.defaults={token:"",jsonrpc:"http://127.0.0.1:6800/jsonrpc",dir:"E:/netdisk"},location.pathname){case"/share/init":location.hash?(document.querySelector("input").value=location.hash.substring(1,5),document.querySelector("a.g-button-blue-large").click()):GM_xmlhttpRequest({url:"https://search.pandown.cn/api/query?surl=1"+location.search.substring(6),method:"GET",onload(e){let t=JSON.parse(e.responseText);0==t.code&&(document.querySelector("input").value=t.data[0].password,document.querySelector("a.g-button-blue-large").click())}});break;case"/disk/home":x(),ipod.aria2=u.load("aria2");null!=ipod.aria2&&"20191120"==ipod.aria2.version||(ipod.aria2=Object.assign(ipod.defaults),_());let e=setInterval(()=>{"function"==typeof jQuery&&(clearInterval(e),location.hash.startsWith("#/all")&&($("div.QDDOQB").removeClass("QDDOQB").addClass("btn-group outline").css("font-size","12.5px").empty().append('<button name="zyset"><i class="ion-settings"></i> \u8bbe\u7f6e</button><button name="zydl"><i class="ion-download"></i> \u4e0b\u8f7d</button><button name="useidm" title="\u5f39\u51fa\u4e0b\u8f7d\u94fe\u63a5\u540e\u53f3\u952e\u4f7f\u7528idm\u4e0b\u8f7d"><i class="ion-cloud-download"></i> &nbsp;idm</button><button name="zyshare"><i class="ion-share"></i> \u514d\u5bc6\u5206\u4eab</button>').on("click",()=>{let e=u.zdom(1);while(!e.hasAttribute("name"))e=e.parentElement;switch(e.getAttribute("name")){case"zyset":_();break;case"useidm":(()=>{let e,t="";if(a().forEach(e=>{t+=u.sprintf('<li> <a href="http://d.pcs.baidu.com/rest/2.0/pcs/file?app_id=266719&method=download&path=%1">%2</a> </li>',encodeURIComponent(e.path),e.server_filename)}),e=document.querySelector("#idmlink"))e.querySelector("ul").innerHTML=t,e.setAttribute("style","display: flex");else{(e=document.createElement("div")).setAttribute("id","idmlink"),e.setAttribute("class","tamper");e.innerHTML='<div class="doc"> <div style="font-size: 16px"> \u9f20\u6807\u53f3\u952e\u83dc\u5355\u8c03\u7528idm\u6216\u8005\u590d\u5236\u94fe\u63a5\u5730\u5740\u7c98\u8d34\u5230idm\u4e2d\u8fdb\u884c\u4e0b\u8f7d <i name="shutidmlink" class="ion-close" style="float: right"></i></div> <ul><ul> </div>',e.querySelector("i.ion-close").addEventListener("click",()=>{document.querySelector("#idmlink").setAttribute("style","display: none")});e.querySelector("ul").innerHTML=t,document.body.appendChild(e)}})();break;case"zydl":e.children[0].setAttribute("class","ion-refresh spinner"),(()=>{let e,t=0,o=0;console.clear(),e=a(),console.log("selectedList = ",e.length),e.length>16?($("div.btn-group.outline > button[name=zydl] > i").attr("class","ion-download"),alert("\u52fe\u9009\u7684\u6587\u4ef6\u6570\u91cf\u8fc7\u591a \u8bf7\u5206\u6279\u6b21\u52fe\u9009\u4e0b\u8f7d\n\u5982\u679c\u52fe\u9009\u7684\u6587\u4ef6\u5939\u4e2d\u542b\u6709\u5927\u91cf\u6587\u4ef6\n\u8bf7\u8fdb\u5165\u8be5\u6587\u4ef6\u5939\u4e2d\u5206\u6279\u6b21\u52fe\u9009\u4e0b\u8f7d\n\u5efa\u8bae\u4e0d\u8981\u4e00\u6b21\u52fe\u9009\u5927\u91cf\u6587\u4ef6\u8fdb\u884c\u4e0b\u8f7d\n\u89e3\u6790\u51fa\u6765\u7684\u4e0b\u8f7d\u5730\u5740\u5b58\u5728\u6709\u6548\u65f6\u95f4\u9650\u5236\n\u56e0\u6b64\u4f1a\u51fa\u73b0\u94fe\u63a5\u5931\u6548\u800c\u9020\u6210\u4e0b\u8f7d\u5931\u8d25")):function n(){if(t==e.length)if(3>++o)t=0,n();else{let t=[],o=[];e.forEach(e=>{if(e.url.length){e.url.reverse(),e.header=ipod.header;t.push(e)}else o.push(e.path)}),o.length&&alert("\u4ee5\u4e0b\u6587\u4ef6\u56e0\u65e0\u6cd5\u83b7\u53d6\u9ad8\u901f\u4e0b\u8f7d\u5730\u5740\u800c\u5ffd\u7565\n\n"+o.join("\r")+"\n\n\u8bf7\u68c0\u67e5\u8fd9\u4e9b\u6587\u4ef6\u662f\u5426\u5df2\u88ab\u5ea6\u76d8\u548c\u8c10\u3002\n\u5982\u679c\u6ca1\u6709\u548c\u8c10\u5219\u5efa\u8bae\u7a0d\u540e\u518d\u8bd5\u6216\u66f4\u6362\u5176\u4ed6\u5ea6\u76d8\u8d26\u53f7\u3002");t.length&&u.aria2(t,ipod.aria2.jsonrpc),$("div.btn-group.outline > button[name=zydl] > i").attr("class","ion-download")}else{let o=e[t];GM_xmlhttpRequest({method:"GET",url:"http://pcs.baidu.com/rest/2.0/pcs/file?app_id=778750&method=download&path="+encodeURIComponent(o.path),headers:ipod.header2,onerror(e){console.log("error parseLink =",++t),e.finalUrl&&o.url.push(e.finalUrl.replace("https","http"));n()},onload(e){console.log("success parseLink =",++t),console.log(JSON.parse(e.responseText));n()}})}}()})();break;case"zyshare":e.children[0].setAttribute("class","ion-refresh spinner"),((e=0)=>{let t=[],o={channel_list:[],path_list:[],period:e,schannel:0};(()=>{let e=[],t=r(i());return $("dd.g-clearfix").each((o,n)=>{if(3==n.getAttribute("class").replace(" open-enable","").trim().split(" ").length){let o=decodeURIComponent($(n).find("a").first().text());t.forEach(t=>{o==t.server_filename&&e.push(t.path)})}}),e})().forEach(e=>{o.path_list.push(e)});for(let e in o)t.push(e+"="+encodeURIComponent(JSON.stringify(o[e])));$.ajax({url:"https://pan.baidu.com/share/pset",method:"POST",data:t.join("&"),success(e){$("div.btn-group.outline > button[name=zyshare] > i").attr("class","ion-share"),0==e.errno?GM_setClipboard(e.link,"text"):alert("\u64cd\u4f5c\u5931\u8d25")}})})(0)}}),navigator.userAgent.includes("Firefox")||$("button[name=zydl]").hide()))},1e3);break;default:x();let t=document.querySelector("#bd > div.bd-aside");t&&t.setAttribute("style","display: none")}if(location.host.includes("wallhaven.cc")){x(),ipod.defaults={token:"",jsonrpc:"http://127.0.0.1:6800/jsonrpc",dir:"D:/picture",pi:"1",extype:".jpg"};ipod.aria2=u.load("aria2"),null!=ipod.aria2&&"20191120"==ipod.aria2.version||(ipod.aria2=Object.assign(ipod.defaults),_());let e=document.querySelector("#thumbs");e&&e.addEventListener("click",()=>{let e=u.zdom(1);fetch(e.getAttribute("href")).then(e=>e.text()).then(e=>{let t=e.match(/<img id="wallpaper" src="(.+?)"/);u.download(t[1])})})}if(location.host.includes("nyaa")){switch(x(),function(){$("#navFilter-category").find(".btn").each((e,t)=>{t.setAttribute("style","background-color:#fff; color:#333; font-size: 14px")}),$("#navFilter-category").next("input").on("focus",function(){this.value=""});$("i.fa-download").each((e,t)=>{t.parentElement.remove()}),$("i.fa-magnet").each((e,t)=>{t.setAttribute("data-url",t.parentElement.getAttribute("href")),t.addEventListener("click",n,!1);t.parentElement.removeAttribute("href"),t.parentElement.setAttribute("style","cursor: default")});$("a[title],a[rel~=nofollow]").each((e,t)=>{t.setAttribute("style","cursor: default"),t.setAttribute("target","_blank")})}(),ipod.defaults={dir:"E:/netdisk/bt",jsonrpc:"http://127.0.0.1:6800/jsonrpc"},ipod.aria2=u.load("aria2"),null!=ipod.aria2&&"20191120"==ipod.aria2.version||(ipod.aria2=Object.assign(ipod.defaults),_()),location.host){case"nyaa.fun":$("#navbar").children("ul").first().empty().append('<li><a id="czyset" href="#">Aria2\u8bbe\u7f6e</a></li> <li><a href="/search/c_1_1_k_0">\u52a8\u6f2b</a></li> <li><a href="/search/c_1_3_k_0">\u6e38\u620f</a></li> <li><a href="/search/c_1_4_k_0">\u6f2b\u753b</a></li> <li><a href="/search/c_1_5_k_0">\u56fe\u7247</a></li> <li><a href="/search/c_2_6_k_0">\u5199\u771f</a></li> <li><a href="/search/c_2_7_k_0">\u89c6\u9891</a></li>');break;case"nyaa.mlyx.workers.dev":case"nyaa.si":$("#navbar").children("ul").first().empty().append('<li><a id="czyset" href="#">Aria2\u8bbe\u7f6e</a></li><li><a href="/?c=1_3">Anime</a></li> <li><a href="/?c=1_1">AMV</a></li> <li><a href="/?c=2_0">Audio</a></li> <li><a href="/?c=5_1">Graphic</a></li> <li><a href="/?c=5_2">Photo</a></li> <li><a href="/?c=6_1">App</a></li> <li><a href="/?c=6_2">Game</a></li>');break;case"sukebei.nyaa.si":$("#navbar").children("ul").first().empty().append('<li><a id="czyset" href="#">Aria2\u8bbe\u7f6e</a></li><li><a href="/?c=1_1">\u52a8\u6f2b</a></li> <li><a href="/?c=1_3">\u6e38\u620f</a></li> <li><a href="/?c=1_4">\u6f2b\u753b</a></li> <li><a href="/?c=1_5">\u56fe\u7247</a></li> <li><a href="/?c=1_2">\u540c\u4eba</a></li> <li><a href="/?c=2_1">\u5199\u771f</a></li> <li><a href="/?c=2_2">\u89c6\u9891</a></li> <li><a href="https://nyaa.si">nyaa</a></li>')}document.querySelector("#czyset").addEventListener("click",()=>{u.zdom(),_()},!1)}if(location.host.includes("acg.rip")){x(),ipod.defaults={dir:"E:/netdisk/bt",pi:"1",jsonrpc:"http://127.0.0.1:6800/jsonrpc"};ipod.aria2=u.load("aria2"),null!=ipod.aria2&&"20191120"==ipod.aria2.version||(ipod.aria2=Object.assign(ipod.defaults),_());setTimeout(()=>{let e,t;document.querySelector("ul.nav.navbar-nav").insertAdjacentHTML("afterbegin",'<li><a id="czyset">Aria2\u8bbe\u7f6e</a></li>'),document.querySelector("#czyset").addEventListener("click",()=>{u.zdom(),_()},!1);(t=document.querySelector("#bangumi-box"))&&t.remove(),(t=document.querySelector("div.footer"))&&t.remove();(e=document.querySelectorAll("i.fa.fa-download")).forEach(e=>{e.addEventListener("click",()=>{let e=u.zdom(),t={dir:ipod.aria2.dir,pi:"1",url:[]};t.url.push(location.origin+e.parentElement.getAttribute("href")),u.aria2([t],ipod.aria2.jsonrpc)})})},2e3)}}();