- 运行环境:PC-windows操作系统
- 软件语言:简体中文|授权方式:
- 软件类型:国产软件 - 应用软件 - 编程相关
- 软件大小:1.00 KB
- 下载星级:
- 软件官网:暂无
- 更新时间:2018/4/4 20:17:14
【软件截图】
【基本介绍】
// ==UserScript==
// @name 全自动替换电影天堂下载链接为迅雷链接
// @namespace undefined
// @version 0.2.2
// @description 去除获取当前最新迅雷检测, 直接迅雷下载
// @author x2009again
// @match *://www.dy2018.com/*
// @match *://www.ygdy8.com/*
// @grant none
// @run-at document-end
// ==/UserScript==
var counter = 0;
var linkflag = false;
function myinit() {
var thunderlink = document.getElementsByTagName('a');
for (var i = 0; i < thunderlink.length; i++) {
if (thunderlink[i].getAttribute('thunderpid')) {
var realthunderlink = '';
var linkattributes = thunderlink[i].attributes;
for (var j = 0; j < linkattributes.length; j++)
{
if (linkattributes[j].value.indexOf('thunder:/') == 0)
{
realthunderlink = linkattributes[j].value;
linkflag = true;
break;
}
}
console.log('realthunderlink:' + realthunderlink);
thunderlink[i].href = realthunderlink;
}
}
}
var
t = window.setInterval(function () { //布置设置一个延时循环, 每隔200ms选择中一下所需的元素, 当所需的元素存就在时, 现在开始脚本, 同一个时间停止stop延时循环
myinit();
if (linkflag) {
window.clearInterval(t);
}
else {
if (counter < 5) {
//console.log('waiting');
counter++;
}
else {
window.clearInterval(t);
//console.log('out of time');
}
}
}, 200);