// ==UserScript== // @name Easy offline | 一键离线下载 // @namespace http://tampermonkey.net/ // @version 0.8 // @description 在种子或视频链接旁添加按钮离线下载至网盘 | Easy stream torrents or videos from cloud storage // @author Hoothin // @include http*://pan.baidu.com/* // @include http://115.com/* // @include https://www.furk.net/* // @include https://www.seedr.cc/* // @match http*://*/* // @grant GM_setValue // @grant GM_getValue // @require http://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js // @downloadURL none // ==/UserScript== function include(Things,obj) { for (var i = Things.length - 1; i >= 0; i--) { if ($(Things[i]).attr('href')===$(obj).attr('href')){ return true; } } } function setCss(){ $('head').append(''); } function getAllEnableUrl() { var rawnodes; if (location.href.indexOf(".torrentkitty.") != -1){ rawnodes = $('a[href^="magnet"],[href$=".torrent"]').get(); }else{ rawnodes = $('a[href^="magnet"],[href^="ed2k://|file"],[href$=".torrent"],[href$=".mp4"],[href$=".rar"],[href$=".7z"],[href$=".zip"],[href$=".rmvb"],[href$=".mkv"]').get(); } if(rawnodes.length>0){ var nodes = []; var codeList = []; var listLen = 0; for (var i = 0; i 0)||i>20){ window.clearInterval(t); getAllEnableUrl(); }else{ i++; } }, 500);