- // ==UserScript==
- // @grant GM_getValue
- // @grant GM_setValue
- // @grant GM_xmlhttpRequest
- // @run-at document-start
- // @name Crack Url Wait Code Login For Chrome
- // @author jixun66
- // @namespace https://greatest.deepsurf.us/scripts/125
- // @description Remove verify code, login requirement, counting down... and more!
- // @version 1.20140305080140
- // @create 2012-01-26
- // @lastmodified 2014.02.25
- // @updateURL https://greatest.deepsurf.us/scripts/125/code.meta.js
- // @downloadURL https://greatest.deepsurf.us/scripts/125/code.user.js
- // 手动在后面匹配
- // @include *://*
- // @copyright 2012+, Yulei, Chrome Compatibility by Jixun.
- // @require http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js
- // ==/UserScript==
- // 开启预览并不会导致浏览器卡死,因为代码插入了很多注释方便阅读。
-
-
- var includeInUrl = [
- // 匹配域名
- /\/\/([a-z0-9-]+\.|)((azpan|xddisk|dxrr|1ting|duole|87pan|sufile|360disk|nyhx|5sing|yimuhe|79pan|zy\.51gugu|sudupan|colafile)\.com|bpan\.net|supan\.la)\//i,
- // 数据银行
- /\/\/dl\.(vmall|dbank)\.com\//i,
- // 盛大网盘 & 119g
- /\/\/(([a-z0-9-]+\.|)everbox|d\.119g)\.com\/f\//i,
-
- // 度娘盘
- /\/\/(pan|yun)\.baidu\.com\/s(hare\/link|\/)/i,
-
- // CSDN
- /\/\/download\.csdn\.net\/download\//,
-
- // it168
- /\/\/([a-z-]+\.|)down\.it168\.com\//i,
-
- // 基于 phpDisk 的网盘
- /\/\/([a-z0-9-]+\.|)((qjwm|7958|2kuai|32666)\.com)\/(view|down|)(file|-|\/|\.)/,
-
- // 飞速盘
- /\/\/([a-z0-9-]+\.|)rayfile\.com\/(.+)\/files\//i,
-
- // 威盘
- /\/\/([a-z0-9-]+\.|)vdisk\.cn\/down\/index\//i,
-
- // YunFile
- /\/\/([a-z0-9-]+\.|)yunfile\.com\/f(ile|s)\//i,
-
- // gxp <- 貌似已死
-
- // 讯载网盘
- /\/\/u\.xunzai\.com\/fileview_/i,
-
- // VeryCD
- /\/\/([a-z-]+\.|)verycd\.com\/(topics|files)\//i,
-
- // 华军
- /\/\/([a-z-]+\.|)onlinedown\.net\/softdown\//i,
-
- // 城通系列 & howfile & fileIm
- /\/\/([a-z-]+\.|)((pipipan|ctdisk|400gb|howfile|fileim)\.com|bego\.cc)\/(file|downhtml)\//i,
-
- // 快盘
- /\/\/([a-z-]+\.|)kuaipan\.cn\/file\/id_/i,
-
- // 短链接
- /\/\/(dc2\.us|dd\.ma|(ref|upan)\.so|t00y\.com)\//i,
-
- // 音乐放这边 >.>
- // Jing.FM
- /\/\/(www\.)?jing.fm\//i,
- // SongTaste
- /\/\/([a-z0-9-]+\.|)songtaste\.com\/(song|album|playmusic\.php)\//i,
- // 虾米音乐
- /\/\/([a-z-]+\.|)xiami\.com\/song\/play$/i,
- // 565656
- /\/\/([a-z0-9-]+\.|)565656\.com\/plus\/player\.ashx/i,
- // djcc & djye
- /\/\/([a-z0-9-]+\.|)(djcc|djye)\.com\/play\.(php|html)/i,
- // djkk
- /\/\/([a-z0-9-]+\.|)djkk\.com\/dance\/play\//i,
- // 9ku
- /\/\/([a-z0-9-]+\.|)9ku\.com\/pp\/(.+)\/pp\./i,
- // 豆瓣电台
- /\/\/douban\.fm\/$/i,
- // 人人电台
- /\/\/fm\.renren\.com\/$/i,
- // 萌否电台
- /\/\/moe\.fm\/listen/i,
- // 邻居的耳朵
- /\/\/kxt\.fm/,
- /\/\/ear\.duomi\.com/,
- // 腾讯电台
- /\/\/fm\.qq\.com/,
- // 音悦台
- /\/\/((www|v)\.)yinyuetai\.com\/(video|playlist)\//i
-
- ],
- excludeInUrl = [
- // 一听歌词页面
- /\/\/([a-z]+\.|)1ting\.com\/lrc/i
- ];
-
- // 兼容中文的 BASE64 编码系统: https://code.google.com/p/javascriptbase64/
- function StringBuffer(){this.buffer=[]}StringBuffer.prototype.append=function(a){this.buffer.push(a);return this};StringBuffer.prototype.toString=function(){return this.buffer.join("")};var Base64={codex:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a){var c=new StringBuffer;for(a=new Utf8EncodeEnumerator(a);a.moveNext();){var b=a.current;a.moveNext();var d=a.current;a.moveNext();var e=a.current,h=b>>2,b=(b&3)<<4|d>>4,g=(d&15)<<2|e>>6,f=e&63;isNaN(d)?g=f=64:isNaN(e)&&(f=64);c.append(this.codex.charAt(h)+this.codex.charAt(b)+this.codex.charAt(g)+this.codex.charAt(f))}return c.toString()},decode:function(a){var c=new StringBuffer;for(a=new Base64DecodeEnumerator(a);a.moveNext();){var b=a.current;if(128>b)c.append(String.fromCharCode(b));else if(191<b&&224>b){a.moveNext();var d=a.current;c.append(String.fromCharCode((b&31)<<6|d&63))}else a.moveNext(),d=a.current,a.moveNext(),c.append(String.fromCharCode((b&15)<<12|(d&63)<<6|a.current&63))}return c.toString()}};function Utf8EncodeEnumerator(a){this._input=a;this._index=-1;this._buffer=[]}Utf8EncodeEnumerator.prototype={current:Number.NaN,moveNext:function(){if(0<this._buffer.length)return this.current=this._buffer.shift(),!0;if(this._index>=this._input.length-1)return this.current=Number.NaN,!1;var a=this._input.charCodeAt(++this._index);13==a&&10==this._input.charCodeAt(this._index+1)&&(a=10,this._index+=2);128>a?this.current=a:(127<a&&2048>a?this.current=a>>6|192:(this.current=a>>12|224,this._buffer.push(a>>6&63|128)),this._buffer.push(a&63|128));return!0}};function Base64DecodeEnumerator(a){this._input=a;this._index=-1;this._buffer=[]}Base64DecodeEnumerator.prototype={current:64,moveNext:function(){if(0<this._buffer.length)return this.current=this._buffer.shift(),!0;if(this._index>=this._input.length-1)return this.current=64,!1;var a=Base64.codex.indexOf(this._input.charAt(++this._index)),c=Base64.codex.indexOf(this._input.charAt(++this._index)),b=Base64.codex.indexOf(this._input.charAt(++this._index)),d=Base64.codex.indexOf(this._input.charAt(++this._index)),e=(b&3)<<6|d;this.current=a<<2|c>>4;64!=b&&this._buffer.push((c&15)<<4|b>>2);64!=d&&this._buffer.push(e);return!0}};
-
- function linkConv(sInput) {
- return Base64.decode((sInput.match(/:\/\/([\/+a-z0-9]+)/i) || [, ''])[1]).replace(/^\[FLASHGET\]|\[FLASHGET\]$|^AA|ZZ$/gi, '');
- }
-
- (function () {
- // 检查所在页面
- var url4Test = '//' + location.host + location.pathname,
- doExec = false;
-
- //console.log ('Current Page: ', location.href,
- // '\nFor Testing', url4Test);
-
- includeInUrl.forEach(function (e) {
- if (doExec) return;
-
- if (e.test(url4Test)) {
- // console.log ('Found match: ', e, url4Test);
- doExec = true
- }
- });
- excludeInUrl.forEach(function (e) {
- if (!doExec) return;
-
- if (e.test(url4Test)) {
- // console.log ('Found Ex-match: ', e, url4Test);
- doExec = false
- }
- });
-
- // console.log (url4Test, doExec);
- if (!doExec)
- return;
-
- var us = (typeof (unsafeWindow) != "undefined"),
- win = us ? unsafeWindow : window,
- sVer = 'Mod-v58';
-
-
- // 防止书签版出错
- if (!us) {
- GM_getValue=function(){return sVer};
- GM_setValue=function(){return !1}
- }
-
- /*
- * jPrintf: 自写函数,参考:
- * http://jixun.org/1656-
- *
- * $_GET: 自写全局变量, 模拟 php 端的 $_GET 变量。参考:
- * http://jixun.org/1774-
- */
- var d = document,
- l = location,
- lurl = l.href,
- gPathway = '',
- showUpdate = 1, // 更新积累 3 个后改成 True.
- body = $('body')[0],
- numKeys = [1, 2, 3, 4, 5, 6, 7, 8, 9, 'C', '0', '←'],
- ubA = function (e) {
- e.outerHTML = e.outerHTML
- },
- cE = function (e) {
- return d.createElement(e);
- },
- bugRepUrl = 'http://userscripts.org/topics/122061#script-nav',
- log = function (a1) {
- console.log((arguments.length > 1) ? arguments : a1)
- },
- dhost = ((new RegExp(/(\w+\.\w+)\//).exec(l.hostname + '/') || [, ''])[1]).toLowerCase(),
- jprintf = jPrintf = function () {
- var b = arguments,
- d = b.length - 1,
- c = b[0];
- if (!(1 > d)) {
- for (var a = 1; a <= d; a++) c = c.replace(RegExp("(\\$|%)" + a, "g"), b[a]);
- return c
- }
- },
- $_GET = (function (a) {
- var z = [],
- b = a.substr(a.indexOf("?") + 1);
- if (b)
- for (var c = b.split("&"), i = 0; i < c.length; i++) {
- var d = c[i].toString(),
- e = d.indexOf("=");
- z[unescape(d.substr(0, e))] = unescape(d.substr(e + 1))
- };
- return z
- })(lurl),
- sUpdated = (GM_getValue('ver', '') != sVer);
-
- function wordpressAudio() {
- log('WordPress Audio 插件通用代码 启动');
- // WordPress Audio 插件通用代码
- var oldEmbed = win.AudioPlayer.embed,
- iCounter = 1;
-
- win.AudioPlayer.embed = function (a, b) {
- log('embed func');
- $('span#audioplayer_' + (iCounter++)).before($('<a>').html('单击下载音频<br>')
- .attr('href', Base64.decode(b.soundFile)).attr('target', '_blank'));
- return oldEmbed(a, b);
- };
- }
-
- function parseHTML(responseText) {
- // For Firefox
- var ret = (new DOMParser()).parseFromString(responseText, "text/html");
-
- // For Chrome
- if (ret == undefined) {
- var ret = document.implementation.createHTMLDocument("");
- ret.querySelector('html').innerHTML = responseText;
- }
- return ret;
- }
-
- function execIfVarDefined(ver4Check, func, replaceVar) {
- var timer = setInterval(function () {
- if (typeof (ver4Check) == 'function') {
- if (!ver4Check()) return;
- } else if (typeof (win[ver4Check]) == 'undefined') {
- return;
- }
- clearInterval(timer);
-
- if (replaceVar && typeof (win[ver4Check]) == 'function') {
- log('Function [ ' + ver4Check + ' ] Hooked.');
- win[ver4Check] = replaceVar;
- }
- if (typeof (func) == 'function') {
- func();
- }
- }, 10);
- }
-
- function makeCpfCss(name, param) {
- var ret = {};
- ret[name] = param;
- ['o','ms','moz','webkit'].forEach (function (e) {
- ret['-' + e + '-' + name] = param;
- });
- return ret;
- }
-
- function safeJump(sTargetUrl) {
- d.title = '正在跳转…';
- log('safeJump :: ' + sTargetUrl);
-
- if (!sTargetUrl)
- return false;
-
- l.href = sTargetUrl;
- return true
- }
-
- function makeDelayCss(sVar) {
- var sP = sVar || 'all .2s';
- return makeCpfCss('transition', sP);
- }
-
- function makeRotateCss(deg) {
- return makeCpfCss('transform', 'rotate(' + deg + 'deg)');
- }
-
- function createNumPad(maxLen, targetInput, finishCallback) {
- var table = cE('table'),
- rcde = targetInput;
- $(table).css({
- 'background-color': '#ffcc99',
- 'position': 'relative',
- 'bottom': '164px',
- 'left': '170px'
- });
- for (var i = 0; i < 4; i++) {
- var tr = cE('tr');
- for (var j = 0; j < 3; j++) {
- var td = cE('td');
- td.innerHTML = $(td).attr('k', numKeys[i * 3 + j]).attr('k');
- tr.appendChild(td);
- }
- table.appendChild(tr);
- }
- $(table).find('td').click(function () {
- var val = rcde.value,
- len = val.length,
- key = $(this).attr('k') || '';
- $(rcde).focus();
- if (len >= maxLen) {
- rcde.value = val.substr(-1 * maxLen);
- finishCallback(rcde.value);
- $(table).hide();
- } else if (key == '←') {
- rcde.value = val.sub(1);
- } else if (key == 'C') {
- rcde.value = '';
- } else {
- rcde.value += key;
- if (len == maxLen - 1) {
- finishCallback(rcde.value);
- $(table).hide();
- }
- }
- }).css({
- 'font': 'bold 25px Tahoma',
- 'color': 'red',
- 'cursor': 'pointer',
- 'vertical-align': ' middle',
- 'text-align': ' center',
- 'border': ' 1px solid #DDDDDD',
- 'padding': '6px',
- 'width': '40px',
- 'height': '40px'
- });
- return table;
- }
-
- //pajhome.org.uk/crypt/md5/md5.js
- function hex_md5(p){function k(c,f,d,b,e,g,k){return h(h(h(c,f&d|~f&b),h(e,k))<<g|h(h(c,f&d|~f&b),h(e,k))>>>32-g,f)}function l(c,f,d,b,e,g,k){return h(h(h(c,f&b|d&~b),h(e,k))<<g|h(h(c,f&b|d&~b),h(e,k))>>>32-g,f)}function m(c,f,d,b,e,g,k){return h(h(h(c,f^d^b),h(e,k))<<g|h(h(c,f^d^b),h(e,k))>>>32-g,f)}function n(c,f,d,b,e,g,k){return h(h(h(c,d^(f|~b)),h(e,k))<<g|h(h(c,d^(f|~b)),h(e,k))>>>32-g,f)}function h(c,f){var d=(c&65535)+(f&65535);return(c>>16)+(f>>16)+(d>>16)<<16|d&65535}return function(c){for(var f=[],d=255,b=0;b<8*c.length;b+=8)f[b>>5]|=(c.charCodeAt(b/8)&d)<<b%32;c=8*c.length;f[c>>5]|=128<<c%32;f[(c+64>>>9<<4)+14]=c;c=1732584193;for(var d=-271733879,b=-1732584194,e=271733878,g=0;g<f.length;g+=16){var p=c,q=d,r=b,s=e;c=k(c,d,b,e,f[g+0],7,-680876936);e=k(e,c,d,b,f[g+1],12,-389564586);b=k(b,e,c,d,f[g+2],17,606105819);d=k(d,b,e,c,f[g+3],22,-1044525330);c=k(c,d,b,e,f[g+4],7,-176418897);e=k(e,c,d,b,f[g+5],12,1200080426);b=k(b,e,c,d,f[g+6],17,-1473231341);d=k(d,b,e,c,f[g+7],22,-45705983);c=k(c,d,b,e,f[g+8],7,1770035416);e=k(e,c,d,b,f[g+9],12,-1958414417);b=k(b,e,c,d,f[g+10],17,-42063);d=k(d,b,e,c,f[g+11],22,-1990404162);c=k(c,d,b,e,f[g+12],7,1804603682);e=k(e,c,d,b,f[g+13],12,-40341101);b=k(b,e,c,d,f[g+14],17,-1502002290);d=k(d,b,e,c,f[g+15],22,1236535329);c=l(c,d,b,e,f[g+1],5,-165796510);e=l(e,c,d,b,f[g+6],9,-1069501632);b=l(b,e,c,d,f[g+11],14,643717713);d=l(d,b,e,c,f[g+0],20,-373897302);c=l(c,d,b,e,f[g+5],5,-701558691);e=l(e,c,d,b,f[g+10],9,38016083);b=l(b,e,c,d,f[g+15],14,-660478335);d=l(d,b,e,c,f[g+4],20,-405537848);c=l(c,d,b,e,f[g+9],5,568446438);e=l(e,c,d,b,f[g+14],9,-1019803690);b=l(b,e,c,d,f[g+3],14,-187363961);d=l(d,b,e,c,f[g+8],20,1163531501);c=l(c,d,b,e,f[g+13],5,-1444681467);e=l(e,c,d,b,f[g+2],9,-51403784);b=l(b,e,c,d,f[g+7],14,1735328473);d=l(d,b,e,c,f[g+12],20,-1926607734);c=m(c,d,b,e,f[g+5],4,-378558);e=m(e,c,d,b,f[g+8],11,-2022574463);b=m(b,e,c,d,f[g+11],16,1839030562);d=m(d,b,e,c,f[g+14],23,-35309556);c=m(c,d,b,e,f[g+1],4,-1530992060);e=m(e,c,d,b,f[g+4],11,1272893353);b=m(b,e,c,d,f[g+7],16,-155497632);d=m(d,b,e,c,f[g+10],23,-1094730640);c=m(c,d,b,e,f[g+13],4,681279174);e=m(e,c,d,b,f[g+0],11,-358537222);b=m(b,e,c,d,f[g+3],16,-722521979);d=m(d,b,e,c,f[g+6],23,76029189);c=m(c,d,b,e,f[g+9],4,-640364487);e=m(e,c,d,b,f[g+12],11,-421815835);b=m(b,e,c,d,f[g+15],16,530742520);d=m(d,b,e,c,f[g+2],23,-995338651);c=n(c,d,b,e,f[g+0],6,-198630844);e=n(e,c,d,b,f[g+7],10,1126891415);b=n(b,e,c,d,f[g+14],15,-1416354905);d=n(d,b,e,c,f[g+5],21,-57434055);c=n(c,d,b,e,f[g+12],6,1700485571);e=n(e,c,d,b,f[g+3],10,-1894986606);b=n(b,e,c,d,f[g+10],15,-1051523);d=n(d,b,e,c,f[g+1],21,-2054922799);c=n(c,d,b,e,f[g+8],6,1873313359);e=n(e,c,d,b,f[g+15],10,-30611744);b=n(b,e,c,d,f[g+6],15,-1560198380);d=n(d,b,e,c,f[g+13],21,1309151649);c=n(c,d,b,e,f[g+4],6,-145523070);e=n(e,c,d,b,f[g+11],10,-1120210379);b=n(b,e,c,d,f[g+2],15,718787259);d=n(d,b,e,c,f[g+9],21,-343485551);c=h(c,p);d=h(d,q);b=h(b,r);e=h(e,s)}f=[c,d,b,e];c="0123456789abcdef";d="";for(b=0;b<4*f.length;b++)d+=c.charAt(f[b>>2]>>b%4*8+4&15)+c.charAt(f[b>>2]>>b%4*8&15);return d}(p)}
-
- log('脚本开始执行。');
- lurl = lurl.substr(0, (lurl + '#').indexOf('#')); // 过滤 # 后面的内容
- log(['调试信息如下:', dhost, lurl, $_GET]);
- log('脚本版本 [ ' + sVer + ' ] , 如果发现脚本问题请提交到 [ ' + bugRepUrl + ' ] 谢谢。');
-
- // 文本类扩展 :: 删除文本后方指定位数
- String.prototype.sub = function (n) {
- return this.substr(0, this.length - n);
- }
-
- // 空白函数, 适合腾空页面函数。
- function eFunc() {}
- function tFunc() { return !0 }
- function fFunc() { return !1 }
-
- // 网盘地址自动导向 [基于 phpDisk 的网盘]
- function chkDU (){
- var chk = /\/(file|)(file|view)([\/.-])/;
- return chk.test (lurl) ? l.href=lurl.replace (chk, '/$1down$3') : !1;
- }
-
- // 强制隐藏/显示某些元素
- function forceHide (what){ injStyle(what + ' { display: none !important }')}
- function forceShow (what){ injStyle(what + ' { display: block !important }')}
- // 强制隐藏框架
- function forceHideFrames (){ forceHide('iframe, frameset, frame')}
-
- // 清 Cookie
- function clearCookie(){var b=new Date,c,e,f,d,g;b.setTime(b.getTime()-864E5);e=document.cookie.split(";");d=document.domain;b=b.toGMTString();if(e)for(g in e)for(f in c=e[g].split("=")[0],c=["",c+"=; expires="+b+"; path=/; domain=."+d+"; ",c+"=; expires="+b+"; path=/; domain="+d+"; ",c+"=; expires="+b+"; domain=."+d+"; ",c+"=; expires="+b+"; domain="+d+"; ",c+"=; expires="+b+"; path=/; ",c+"=; expires="+b+"; "],c)document.cookie=c[f]}
-
- // 移除站外链接
- function clearOutsiteLink() {$('a').not('[href*="' + dhost + '/"]').remove()}
-
- // 插入样式表
- function injStyle(s) {
- var st = cE('style');
- st.innerHTML = s;
- d.body.appendChild(st);
- return st;
- }
-
- // DOMContentLoaded
- $(function () {
- if (showUpdate && sUpdated) {
- GM_setValue('ver', sVer);
- alert('\
- \n感谢您更新脚本 [ CUWCL4C ] 到最新版 [' + sVer + '],\
- \n以下为该版本的更新日志:\
- \n* 修正某个广告盘的地址匹配 [topics/198004]\
- \n\
- \n如果发现不兼容的情况 (如: 页面错位, 功能失效)\
- \n或新功能建议, 如 xx 站点的下载解析\
- \n欢迎提交到脚本讨论区 ≧▼≦\
- \n最后, 如果您喜欢该脚本还请打个 5 分 & 收藏, 谢谢~');
- }
-
- log('进入 DOMContentLoaded 事件。');
- log('域名判断: ' + dhost);
- /*
- execIfVarDefined('OnDownloadClick_Simple', function () {
- var tLink = arguments[0].getAttribute('thunderhref').substr(10);
- var dlLink = Base64.decode(tLink);
- dlLink = dlLink.substr(2, dlLink.length - 4);
- console.log(dlLink);
- return false;
- }, true);
- */
- setTimeout(function () {
- // 域名判断开始
-
- var continueScript = false;
- switch (l.hostname.toLowerCase()) {
- case 'yun.baidu.com':
- case 'pan.baidu.com':
- // 因为度娘知道自己的所谓云管家不能在非 Windows 下运行
- // 因此识别器更改为非 Win32 即可绕过云管家提示。
- win.navigator.__defineGetter__ ('platform', function () {return 'Cracked by Jixun ^^'});
- break;
- default:
- continueScript = true;
- }
-
- if (!continueScript) return;
-
- switch (dhost) {
- case 'jing.fm':
- execIfVarDefined (function () {
- return win.Player.player.jPlayer
- }, function () {
- log ('jing.fm Loader Start~');
- var myDlBox = $('<a>').appendTo($('#mscPlr')).css({
- position: 'absolute',
- right: 0,
- zIndex: 9
- }).attr('target', '_blank').text('下载');
-
- win.Player.player.bind(win.$.jPlayer.event.loadstart, function (eve) {
- myDlBox.attr('href', eve.jPlayer.status.src.replace(/\d+$/, 0))
- });
- });
- case 'colafile.com':
- chkDU ();
-
- // 过 ABP 检测
- win.___baseNamespaceName = "CproNamespace";
-
- // 如果支援 CSS4, 可以这样写 li! > a[href*="vip"]
- forceHide ('[class^="ad"], #down_link>li, a[href*="vip"]');
- // 妈蛋你们到底会不会写网站
- forceShow ('#right>.ad1, #down_link>li:first-child');
- break;
- // 通用 phpDisk 网盘
- case '2kuai.com':
- case '32666.com': // <- 乱七八糟广告就属它最多
- forceHide ('a[href*="vip"]');
- case "bpan.net":
- case '360disk.com':
- case 'dxrr.com':
- /* case "gxp.cc": */
- if (chkDU()) return;
-
- $('script,iframe').remove();
- forceHide ('.ad,#vcode,#tui,.dcode,#down_box2,#dl_tips');
- injStyle ('#down_box,#dl_addr{display:block !important}');
- $('#down_link').next().remove();
- $('#ct .viewl,.nal,.scbar_hot_td').remove();
- //win.update_sec = false;
- //(win.down_file_link||eFunc)();
- //win.down_process = eFunc;
- break;
- case 'sudupan.com':
- var tU = lurl.replace(/\/dz_/i, '/xzdz_');
- if (tU != lurl)
- l.href = tU;
- clearOutsiteLink();
- break;
-
- case 'yinyuetai.com':
- // http://www.yinyuetai.com/insite/get-video-info?videoId=[视频ID]&json=true
-
- var fetchDlUrlById = function (iId, fCallback) {
- log('Loading video for ' + iId);
- // 因为跨域, 所以 =-=
- GM_xmlhttpRequest ({
- method: 'GET',
- url: "http://www.yinyuetai.com/insite/get-video-info?json=true&videoId=" + iId,
- onload: function (u) {
- var r = JSON.parse (u.responseText);
- fCallback(r.videoInfo.coreVideoInfo.videoUrlModels, r.videoInfo.coreVideoInfo.videoName);
- },
- onerror: function (r) {
- fCallback(false);
- }
- });
- };
-
- var $appTo, $ap1After2, $display = '',
- eDiv = $('<div>');
-
- function appendDlLinks(dlLinks, videoTitle) {
- if (dlLinks === false) {
- console.error('解析失败! ID: ', currentVideoId);
- return;
- }
- eDiv.css ({
- color: 'white',
- 'font-size': 'small',
- 'margin-left': '7px'
- });
- eDiv.html('下载: ').css('display', $display);
- dlLinks.forEach(function (e) {
- $('<a>').text(e.QualityLevelName).attr('href', e.videoUrl)
- .attr('title', '下载: ' + videoTitle).appendTo(eDiv)
- .addClass ('c_cf9');
- eDiv.append(' | ');
- });
- eDiv.append('提供: CUWCL4C ' + sVer);
- if ($ap1After2 == 1)
- $appTo.append (eDiv);
- else // 2
- $appTo.after (eDiv);
- // $('#download').href = dlLink;
- }
-
- if (/^\/video/i.test(l.pathname)) {
- // Signal
- var currentVideoId = parseInt(l.pathname.match(/\d+/)[0]);
- $appTo = $('.vchart'); $ap1After2 = 2;
- fetchDlUrlById(currentVideoId, appendDlLinks);
- } else {
- $ap1After2 = 1;
- $display = 'inline';
- execIfVarDefined (function () {
- return $('.J_mv_content').length;
- }, function () {
- $('.J_mv_content').on('DOMSubtreeModified', function () { setTimeout (function () {
- log ('> Switch');
- $appTo = $('<div>').css('display', $display).appendTo('.J_video_info');
- fetchDlUrlById(($('.J_video_info a[href*="video/"]').attr('href').match (/\d+(\/|)$/)||[])[0], appendDlLinks);
- }, 10)});
- });
- }
- break;
-
- case 'kxt.fm':
- wordpressAudio();
- break;
-
- case 'duomi.com':
- if (l.host == 'ear.duomi.com')
- wordpressAudio();
- break;
-
- case 'renren.com':
- execIfVarDefined(function () {
- return win.XN.APP.WebRadioNotlogin.player.play;
- }, function () {
- // 插入播放按钮
- var dlLink = $('<a>').attr('title', '单击下载').css(makeRotateCss(90)).css({
- 'width': '38px',
- 'height': '36px',
- 'background-position': '-4px -820px',
- 'margin-top': '-2px'
- }).attr('href', win.XN.APP.WebRadioNotlogin.player.getPlayer().src);
- $('.operation #lrc').before(dlLink);
- var oldPlay = win.XN.APP.WebRadioNotlogin.player.play;
- win.XN.APP.WebRadioNotlogin.player.play = function (url, f0) {
- console.warn(arguments);
- var ret = oldPlay.apply(win.XN.APP.WebRadioNotlogin.player, [arguments]);
- dlLink.attr('href', url);
- return ret;
- }
- });
- break;
-
- case 'qq.com':
- log('Waiting for fmQQ...');
- execIfVarDefined(function () {
- return (typeof (win.$.qPlayer.player.playUrl) == 'function')
- }, function () {
- log('fmQQ Hook start!');
-
- // CreateDLButton
- var dlLink = $('<a>').css(makeRotateCss(90)).css({
- 'background-position': '-24px -73px'
- });
- $('.btn_del').after(dlLink);
-
- var firstRun = true;
- oldPlayurl = win.$.qPlayer.player.playUrl;
- win.$.qPlayer.player.playUrl = function (songUrl) {
- dlLink.attr('href', songUrl).attr('title', '单击下载: ' + win.$.qPlayer.playList.getSongInfoObj().msong);
-
- if (firstRun)
- return firstRun = 0;
-
- return oldPlayurl(songUrl);
- };
- win.$.qPlayer.player.playUrl(win.$.qPlayer.playList.getSongInfoObj().songurl);
- log('fmQQ Hook finish!');
- });
- break;
-
- case 'moe.fm':
-
- execIfVarDefined('playerInitUI', function () {
- // 登录破解
- win.is_login = true;
-
- log('fmMoe Hook start!!');
- var dlLink = $('<a>').addClass('player-button left').css(makeRotateCss(90)).css({
- 'width': '26px',
- 'background-position': '-19px -96px'
- });
- $('div.player-button.button-volume').first().after(dlLink);
-
- var oldPlayerInitUI = win.playerInitUI;
- win.playerInitUI = function (a) {
- dlLink.attr('href', a.completeUrl).attr('title', '单击下载: ' + a.title);
- log(a);
- return oldPlayerInitUI(a);
- };
- log('fmMoe Hook finish!!');
- });
-
- break;
-
- case "dbank.com":
- case "vmall.com":
-
- // 页面整理。
- $('#c_footer, #filelist_marker, div.link-left .panel-line, div[id^="ad_"], .panel-recommended, #hotkw, p.copyright-tips').remove();
- break;
-
- case "vdisk.cn":
- //Weipan-vdisk,wait 10s,code
-
- // US ID: 152764
- // 模拟: yanzheng_ok & 清理右下角广告
- $('#btnbox').show();
- $('#loadingbox, #yanzhengbox, #yzmbox, #ShowDIV, script[src^="http"], ifarme, div[style*="width:728px"][style*="left:50%"], div[style*="height:90px"]').remove();
-
- // 清理乱七八糟的链接
- $('a[href^="http"]').not('[href*="vdisk"]').remove();
-
- break;
-
- case "onlinedown.net":
- //Huajun,code
- // win.CustomDefinedAjaxOnkeyup(2);
- $('div#box, div#cover, div.right, div.idczone, div.downbody:eq(1)').remove();
- $('div#ft').css('margin-top', '20px');
- break;
-
- case "verycd.com":
- //VeryCD2-Dianlu
-
- var topicId = (location.href.match(/topics\/([\d]+)/i) || [, 0])[1];
- if (!topicId) {
- // 检查是否为文件页
- if (!/^\/files\//i.test(l.pathname))
- return;
-
- var sDlbox = '.topic_dl_notice';
- log('verycd file page');
-
- // 收集信息
- var sTitle = $('.fileTitle').text(),
- iSize = parseInt(l.pathname.substr(39)),
- sHash = l.pathname.substr(7, 32);
-
- // 构建新链接
- // ed2k://|file|文件名|大小|哈希值|/
- var sEd2kLink = jprintf('ed2k://|file|%1|%2|%3|/', encodeURIComponent(sTitle), iSize, sHash);
-
- log(sEd2kLink);
-
- execIfVarDefined(function () {
- return $(sDlbox).length;
- }, function () {
- $(sDlbox).html('下载: ').append($('<a>').text('' + sTitle).attr('href', sEd2kLink))
- });
- // 创建元素并插入
-
-
- // 函数强制返回,防止执行其它函数。
- return;
- }
-
- function byte2Str(inp) {
- var f = parseFloat(inp),
- unit = ['字节', 'KB', 'MB', 'GB', 'TB'],
- fUnit = 0;
- while (f > 1126) {
- f /= 1024;
- fUnit += 1;
- }
- return f.toFixed(2).toString() + ' ' + (unit[fUnit] || '未知单位');
- }
-
- function ed2kLink(aHref) {
- var ed2kArr = aHref.substr(0, aHref.length - 2).substr(13).split('|');
- return ({
- name: decodeURIComponent(ed2kArr[0]),
- size: parseInt(ed2kArr[1]),
- sizs: byte2Str(ed2kArr[1]),
- hash: ed2kArr[2],
- extr: ed2kArr[3]
- });
- }
-
- function buildTr(aHref) {
- var ed2k = ed2kLink(aHref),
- tr = cE('tr'),
- d1 = cE('td'),
- d2 = cE('td'),
- tbox = cE('input'),
- aLink = cE('a'),
- iLink = cE('a');
-
- d1.className = 'post2';
- d2.className = 'post2';
- tbox.type = 'checkbox';
- tbox.className = 'fBoxT';
- tbox.value = aHref;
- tbox.checked = 'checked';
-
- aLink.textContent = ed2k.name;
- aLink.href = aHref;
- aLink.style.width = '570px';
- aLink.style.paddingLeft = '8px';
- // aLink.style.width = '600px';
- aLink.style.overflow = 'hidden';
- aLink.style.whiteSpace = 'nowrap';
- aLink.style.textOverflow = 'ellipsis';
-
- iLink.textContent = '[详]';
- iLink.target = '_blank';
- iLink.href = '/files/' + ed2k.hash + ed2k.size;
- // //www.verycd.com/files/ [HASH] [SIZE]
-
- d2.textContent = ed2k.sizs;
-
- // 合并组件
- d1.appendChild(tbox);
- d1.appendChild(iLink);
- d1.appendChild(aLink);
- tr.appendChild(d1);
- tr.appendChild(d2);
-
- return tr;
- }
-
- var parseVeryCD = function (aLink) {
- log(['parseVeryCD', aLink]);
- var topDiv = cE('div'),
- mainDiv = cE('div'),
- bottomTr = cE('tr'),
- mainTable = cE('table');
- var sAll = cE('input'),
- dAll = cE('input'),
- sAlabel = cE('label'),
- tdBot = cE('td'),
- tdSiz = cE('td'),
- ePre = cE('pre');
-
- function updateSize() {
- var boxes = document.querySelectorAll('.fBoxT'),
- tSize = 0,
- j = 0;
- for (var i = 0; i < boxes.length; i++) {
- if (boxes[i].checked)
- tSize += ed2kLink(boxes[i].value).size, j++;
- }
- tdSiz.textContent = byte2Str(tSize);
- sAll.checked = (j == i);
- }
-
- topDiv.innerHTML = '电驴链接';
- topDiv.className = 'emuletop';
- mainDiv.className = 'emulemain';
- tdSiz.id = 'allExpSize';
- tdSiz.className = 'emulesize post';
- tdSiz.style.background = 'inherit';
- mainTable.setAttribute('cellpadding', '2');
- mainTable.setAttribute('cellspacing', '1');
- mainTable.setAttribute('width', '100%');
-
- // 全选
- sAll.id = 'sAll';
- sAll.checked = true;
- sAll.className = 'sAll';
- sAll.type = 'checkbox';
- sAlabel.setAttribute('for', 'sAll');
- sAlabel.textContent = '全选';
- sAll.addEventListener('click', function () {
- var boxes = document.querySelectorAll('.fBoxT');
- for (var i = 0; i < boxes.length; i++) {
- boxes[i].checked = this.checked;
- }
- updateSize();
- }, false);
-
- // 导出链接
- dAll.type = 'button';
- dAll.value = '导出所选链接';
- dAll.className = 'button downall';
- dAll.style.marginLeft = '10px';
- dAll.addEventListener('click', function () {
- ePre.innerHTML = '';
- var boxes = document.querySelectorAll('.fBoxT');
- for (var i = 0; i < boxes.length; i++) {
- if (boxes[i].checked)
- ePre.textContent += boxes[i].value + '\n';
- }
-
- // 高亮选中文本
- var selection = unsafeWindow.getSelection();
- var range = document.createRange();
- range.selectNodeContents(ePre);
- selection.removeAllRanges();
- selection.addRange(range);
-
- }, false);
-
- // 导出链接输出用样式表
- ePre.style.whiteSpace = 'pre-wrap';
- ePre.style.wordBreak = 'break-all';
-
- bottomTr.appendChild(sAll);
- bottomTr.appendChild(sAlabel);
- bottomTr.appendChild(dAll);
- bottomTr.appendChild(tdSiz);
-
- for (var i = 0; i < aLink.length; i++) {
- mainTable.appendChild(buildTr(aLink[i]));
- }
-
- // 文件选择事件
- mainDiv.addEventListener('click', function (e) {
- if (e.target.className == 'fBoxT')
- updateSize();
- }, false);
-
- mainTable.appendChild(bottomTr);
- mainDiv.appendChild(mainTable);
-
- //var iptInt = setInterval (function () {
- var dlDiv = document.querySelector('#iptcomED2K');
-
- //if (!dlDiv)
- // return;
-
- //clearInterval (iptInt);
- dlDiv.innerHTML = '';
- dlDiv.appendChild(topDiv);
- dlDiv.appendChild(mainDiv);
- dlDiv.appendChild(ePre);
- updateSize();
- /*$('<style>').html('[class^="downloadCounter_"],[class^="downloadCounter_"] { display: none !important; }')
- .appendTo ($('body'));
- */
- //}, 100);
- };
-
- log('requesting page...');
- var parseStage1 = function (r) {
- var aLinks = parseHTML(r.responseText).querySelectorAll('a[href*="/detail.htm?id="]');
- var aHrefs = [],
- lStat = [],
- finalEd2k = [];
-
- var checkIfReady = function () {
- if (lStat.join('').indexOf('0') == -1)
- parseVeryCD(finalEd2k);
- };
-
- var parseStage2 = function (id) {
- var _arrId = id;
- log('req Start : ' + _arrId);
- GM_xmlhttpRequest({
- url: aHrefs[i],
- method: 'GET',
- onload: function (r) {
- log('req Finish: ' + _arrId);
- finalEd2k[_arrId] = parseHTML(r.responseText).querySelector('a[href^="ed2k://"]').href;
- lStat[_arrId] = 1;
- checkIfReady();
- },
- synchronous: true,
- });
- }
- for (var i = 0; i < aLinks.length; i++) {
- aHrefs.push(aLinks[i].href);
- lStat.push('0');
- finalEd2k.push('');
- parseStage2(i);
- }
-
- };
-
- var sNewAddr = 'http://www.icili.com/emule/download/' + topicId;
- GM_xmlhttpRequest({
- url: sNewAddr,
- method: 'GET',
- onload: function (r) {
- log(parseHTML(r.responseText));
- var aLink = [],
- arrLinks = parseHTML(r.responseText).querySelectorAll('a[href^="ed2k://"]');
-
- for (var i = 0; i < arrLinks.length; i++)
- aLink.push(arrLinks[i].href);
-
- parseVeryCD(aLink);
- }
- });
-
- break;
- case 'sufile.com':
- case "yunfile.com":
- log ('没精力更新垃圾网盘了,以下代码仅供参考。');
- chkDU();
- break;
-
- //YunFile;Wait 30,No-Ad,Timeout
- var wS = $('#down_interval_tag'),
- $vcode = $('#vcode'),
- $tip = $('<span>').text('请输入验证码,输入后自动跳转…').css({
- 'color': 'red',
- 'display': 'block'
- });
- $('h2.title').append($tip);
-
- var bVarCode = ($('img[src="/verifyimg/getPcv.html"]').length > 0);
-
- if (win.redirectDownPage && bVarCode) {
- // 验证码页面
- $('#inputDownWait *').hide();
- $('#inputDownWait').append(
- createNumPad(4, $vcode[0], function () {
- var time2Wait = wS.length ? parseInt(wS.text()) * 60000 : 1,
- arg = arguments;
-
- log('set time2Wait: ' + time2Wait);
- setTimeout(function () {
- log(arguments);
- var targetLink = $('#downpage_link').attr('href').replace('.html', '/' + arg[0] + '.html');
- log('set targetLink: ' + targetLink);
- l.href = targetLink;
- }, time2Wait); // 自动排队
- $tip.text('正在自动排队,排队完毕后自动跳转…').css({
- 'border': 'red 2px dashed',
- 'padding': '10px'
- });
-
- var t = $vcode;
-
- while (t.prop("tagName").toLowerCase() != 'table')
- t = t.parent();
-
- t.hide();
-
- })
- );
- } else if (win.redirectDownPage) {
- // 无验证码
- $tip.text('正在自动排队,排队完毕后自动跳转…');
- setTimeout(function () {
- (win.redirectDownPage || eFunc)();
- win.doDownload = tFunc; // 停用 40s 超时
- win.setcode();
- win.downSubmit();
- }, wS.length ? parseInt(wS.text()) * 60000 : 1); // 自动排队
- } else {
- execIfVarDefined('doDownload', function () {
- win.setcode();
- win.downSubmit();
- }, tFunc);
- }
- break;
-
- case "qjwm.com":
- case "7958.com":
- if (l.href.toLowerCase().indexOf("down_") > 0) l.href = lurl.replace(/down_/i, 'download_');
- $('.YXM-bg, #foot, #weizhi, .fenxiang, table, div#top, #my_yzm, #inputyzm, .clear, .m1.fr, a[href$="money.html"], a[href$="reg.html"]').remove();
- log('等待加载完毕…');
- execIfVarDefined('downurl', function () {
- $('#downtc').html(win.downurl);
- });
- break;
-
- case "rayfile.com":
- //Feisu-Rayfile,nextpag,showdown
- if (win.vkey) {
- l.href = lurl + win.vkey;
- } else {
- win.filesize = 100;
- win.showDownload();
- win.showDownload = eFunc; // 防止 7 秒后按钮被覆盖。
- // 天知道这个错误怎么来的.. 语言错误就显示不了下载按钮..
- $('#downloadlink').addClass('btn_downNow_zh-cn');
- $('#vodlink').addClass('btn_downTools_zh-cn');
- // 整理页面
- $('div.left, iframe').remove();
- };
- break;
-
- case "songtaste.com":
- // SongTaste,Source-Code by (inc/common.js)
- // By Yulei 2012.11.30 ;Remove register and logon to tips.
- // Simplify Code + Simulate Official site action + Chrome Fix.
-
- var cssCode = {
- 'font-size': '15px',
- 'color': '#fff',
- 'background-color': '#000',
- 'text-decoration': 'none',
- 'padding': '3px 5px'
- };
- var sId = $_GET['song_id'] || (function () {
-
- if (lurl.toLowerCase().indexOf('/album/') != -1) {
- // 专辑页面功能添加
- log('ST :: 专辑页面调整');
- var btn_playAll = $('[value="连续播放"]');
- var btn_noPopPlay = btn_playAll.clone().attr({
- 'value': '不弹窗播放',
- 'onclick': ''
- });
- btn_noPopPlay.click(function () {
- var id = "",
- arr = win.chkArray;
-
- for (i = 0; i < arr.length; i++) {
- if (arr[i].checked) {
- id += arr[i].value + ",";
- }
- }
-
- if (id.length > 1) {
- id = id.sub(1);
- l.href = "/playmusic.php?song_id=" + id;
- } else {
- alert("请选择歌曲");
- }
- });
- btn_playAll.after(btn_noPopPlay);
- return;
- }
- log('ST :: 单曲模式解析');
- var Args = $("#playicon a")[0].href.replace(/ /g).replace(/\"/g, "'").split('\'');
- var sURL = Args[5],
- sType = Args[11],
- sHead = Args[13],
- sId = Args[15],
- sTime = ((new RegExp(/,(\d+)\)/).exec(Args[16]) || [, '0'])[1]);
- if (sURL.indexOf('rayfile') > 0) {
- var SongUrl = sHead + sURL + win.GetSongType(sType);
- } else {
- SongUrl = $.ajax({
- type: 'POST',
- url: '/time.php',
- cache: true,
- /* 从缓存读,反正如果没记录可以跑到 ST 服务器下 */
- async: false,
- data: 'str=' + sURL + '&sid=' + sId + '&t=' + sTime,
- dataType: 'html',
- }).responseText;
- }
- $('a#custom_2').attr({
- 'href': SongUrl,
- 'title': 'Cracked By jixun66'
- }).css(cssCode).text('音乐直链');
- return false;
- })();
- if (sId) {
- // 下载解析 - Hook 更换歌曲的函数,避免重复读取歌曲 + 不需要多次请求服务器不容易掉线。
- log('ST :: 列表模式解析');
- win.changeSong_e = win.changeSong;
- win.changeSong = function (a1, a2, a3) {
- // 2013.03.19 & 2013.04.09 修正:
- // 已经删除的歌曲自动跳到下一曲
- if (a1.trim() == '') {
- win.pu.doPlayNext(2);
- return;
- }
- log('请求歌曲 :: ' + a1 + ' :: ' + a2);
- $('#dl_Link').attr({
- 'href': a2,
- 'title': a1
- });
- document.title = 'ST - ' + a1;
- // 转接给原函数
- win.changeSong_e(a1, a2, a3);
- };
-
- win.downSong = function () {
- win.open(win.theSongUrl);
- };
- $('div#left_music_div div.p_fun a:eq(2)').css(cssCode)
- .text('直链下载').attr({
- 'id': 'dl_Link',
- 'target': '_blank'
- });
-
-
- // 2013.03.19 添加:
- // 重建播放列表地址
- $('p.p_list_txt').append($('<a>').text('重建播放列表').click(function () {
- l.href = '//songtaste.com/playmusic.php?song_id=' + win.arr_ids.join(',');
- }).css({
- 'cursor': 'pointer'
- }));
-
-
- log('ST :: 等待网页加载...');
- var iNv = setInterval(function () {
- if (!win.pu.doPlayNext) {
- return;
- }
- log('ST :: 官方播放器删除功能修正启动');
-
- // 修正播放器删除代码错误 :: 开始
- win.pu.doPlayNext = function (t) {
- for (var i = 0; i < win.arr_ids.length; i++) {
- if (win.arr_ids[i] == win.cur_sid) {
- var now = i;
- break;
- }
- }
- // 寻找下一首未删除的歌曲。
- // * 2013.01.29 修正
- // 1. 上一首查找失败的情况下会滚回到当前音乐的错误。
- // 2. 如果没有可听歌曲情况下无限循环的错误。
-
- var now = Math.abs((now || 0) + t),
- avl = 0;
-
- // 检查是否有歌曲剩余
- for (var i = 0; i < win.arr_ids.length; i++) {
- if (win.arr_ids[i]) {
- avl++;
- }
- }
- if (avl == 0) {
- alert('歌都被删光了还听啥...');
- return;
- }
-
- // 寻找空位
- while (true) {
- if (win.arr_ids[now]) {
- log('切换歌曲 :: ' + now.toString());
- win.pu.utils(now);
- win.cur_sid = win.arr_ids[now];
- win.playSongRight();
- return;
- }
- now += t >= 0 ? 1 : -1;
- if (win.arr_ids.length <= now) {
- now = 0;
- }
- if (now < 0) {
- now = win.arr_ids.length;
- }
- }
- }
-
- win.delSongDiv = function (songid, isbox) {
- log('删除歌曲 :: ' + songid.toString());
- $('#' + songid).hide();
- var new_songlist = new Array();
- for (var i = 0; i < win.arr_ids.length; i++) {
- if (win.arr_ids[i] == songid) {
- if (songid == win.cur_sid) {
- win.pu.doPlayNext(1);
- }
- win.arr_ids[i] = 0;
- }
- }
- }
- // 修正播放器删除代码错误 :: 结束
- log('ST :: 官方播放器删除功能修正结束');
-
- clearInterval(iNv);
-
- }, 100);
- }
- break;
-
- case "5sing.com":
- //By Yulei 2012.11.27
- // Easy way of getting the link url: by jixun
- if (l.href.toLowerCase().indexOf("down") > 0) {
- if (window.confirm('单击确定返回到歌曲信息目录解析下载地址。')) {
- var urls = lurl.replace(/down\.aspx\?sid\=/i, '');
- l.href = urls + ".html";
- }
- break;
- }
-
- if (l.hostname == 'fm.5sing.com') {
- // 晚点再搞播放列表那的下载按钮。
- // 刚开始加载的网页执行太快了,Hook 慢了点,所以把 _down 也 Hook 过来。
- execIfVarDefined ('getPlayInfo', function () {
- var getPlayInfo_e = win.getPlayInfo;
- win.getPlayInfo = function (a1, a2) {
- var sUrl = win.wsplayer.playList[win.wsplayer.playIndex].mp3;
- log('5sing :: 歌曲解析 :: ' + a2.songname + ' :: ' + sUrl);
- $('#playerbox .action_btn a.jp-download').attr({
- 'href': sUrl,
- 'target': '_blank',
- 'title': '下载 ' + a2.songname,
- 'onclick': 0
- });
- return getPlayInfo_e (a1, a2);
- }
- $('span.action_shop a.download').each(function(i){
- this.href = win.wsplayer.playList[i].file;
- });
- });
- win._down = function () {
- win.open(win.wsplayer.playList[win.wsplayer.playIndex].mp3);
- }
- } else {
- execIfVarDefined (function () {return win.wplayer.playList[0].file;}, function () {
- $('a[href^="/down/"]').attr({
- 'href': win.wplayer.playList[0].file,
- 'target': '_blank',
- 'title': 'Cracked By jixun66'
- }).html('<b/>直链下载')
- });
- }
- break;
-
- case "it168.com":
- //ReAD,Vcode,By Yulei 2012.12.17
- win.callid = 'Jixun';
- jQuery(".right_four").remove();
- var dl = $("#download");
- dl.html('<a href="javascript:func1();" class="sign11" style="color:greenyellow" ' + 'title="点击下载(^__^) Cracked By Yulei"> ' + dl.html() + "</a>");
- break;
-
- case '119g.com':
- var reg = /^(\/f\/[a-z0-9]+)(_bak|)/i;
- if (!reg.test(location.pathname))
- return;
-
- var mat = location.pathname.match(reg) || [, '', ''];
- if (!mat[2])
- location.pathname = mat[1] + '_bak.html';
-
- break;
-
- case "yimuhe.com":
- // yimuhe ,Vcode,8s,By Yulei 2012.12.26
- // Make it easy by jixun66
- // /n_dd.php?file_id=476136&userlogin=niuge&ser=1
- chkDU();
-
- $('#download').show();
-
- $('#loading, #yzm, .disk_downg, .guanggao, .disk_l, div.yzmq, div[style*="height:90px"]').remove();
- $('.disk_down').css({
- 'float': 'left'
- });
-
- if (location.pathname != "/filedown.php") {
- var aLink = $('a img[src="n_images/ico_c.gif"], a img[src="n_images/ico_b.gif"]').parent();
- win.down_file = function () {
- var rep = $.ajax({
- type: 'GET',
- url: jprintf('/n_dd.php?file_id=$1&ser=$2', arguments[0], arguments[4] || '1'),
- cache: true,
- /* 从缓存读,反正如果没记录可以跑到服务器下 */
- async: false,
- dataType: 'html',
- }).responseText;
- var rL = parseHTML(rep).querySelector('a#downs').href;
- log('一禾木 :: ' + rL);
- aLink.attr({
- 'href': rL,
- 'onclick': ''
- });
- }
- aLink.click();
- } else {
- win.down_file = function (fId, a2, sKey, sFn, iSid, sType, a7, a8, a9) {
- var rL = jprintf('//down$1.yimuhe.com/downfile/$2.$3?key=$4&type=$5', a9, sKey, sFn, iSid, a7)
- log('一禾木 :: ' + rL);
- l.href = rL;
- }
- }
- break;
-
- case "xunzai.com":
- $('div#search, div.viewl, div.module.cl').remove();
-
- $('div.qutuBox').parent().remove();
- $('img').parent().parent().remove();
- break;
-
- case "djkk.com":
- // 参考 Music liker for Beauty 代码,感谢 @yulei
- var pl4 = document.getElementsByClassName('play_4')[0],
- rmp3 = win.list[0].m4a.replace(/mp\./, 'do.').replace(/m4a/g, 'mp3'),
- myStyle = 'background: transparent url("/images/p_down.gif") no-repeat left center; height:15px; width:15px;';
- if (/img/g.test(pl4.innerHTML)) {
- pl4.innerHTML = "<a href='" + win.list[0].m4a + "' style='color:blueviolet' target='_blank' title='试听音乐下载 - Cracked By Yulei'><b style='" + myStyle + "'> </b>普通</a>";
- pl4.innerHTML += "<a href='" + rmp3 + "' title='高品质音乐下载 - Cracked By Yulei' target='_blank'><b style='" + myStyle + "'> </b>高清</a>";
- pl4.style.width = "82px";
- document.getElementsByClassName('play_2')[0].style.display = "none";
- }
- break;
-
- case 'kuaipan.cn':
- // 新版更新:
-
- execIfVarDefined('CONST', function () {
- win.CONST.Token = 'Cracked By Jixun ^^';
- });
-
- /*
- // 金山快盘免登录下载解析
- $('#jQrcodeDownload')
- .attr ('class', 'imitate-btn f16 btn-blue l')
- .text('免登录下载');
- $('#jQrcodebox').html ('免登录下载已开始,请等待下载提示...');
- $('#qrcode').remove();
- $('<div id="qrcode">').appendTo (body);
- win.encodeURIComponent_e = win.encodeURIComponent;
- win.encodeURIComponent = function (a1) {
- if (a1.toString().indexOf('/getdl?') >= 0) { l.href = a1.toString(); return false; }
- return win.encodeURIComponent_e (a1);}
- */
- break;
-
- case 'howfile.com':
- forceHide ('#floatdiv div');
- injStyle ('#floatdiv {top: 150px; z-index: 99999; display: block !important;}');
- $('iframe,script,.row1_right').remove();
-
- break;
-
- case '51gugu.com':
- $('#pwd_input_box').remove();
-
- execIfVarDefined('GetUrl', function () {
- $('.fileinfo').append($('<a>').attr('href', 'javascript:void(0);').click(function () {
- l.href = win.GetUrl(win.root_dirid)
- }));
- });
- break;
-
- case "fileim.com":
- /* // 没精力更新了w 请自行改用原版
- // 取消绑定原定事件后绑定自己的事件
- // P.S. jQuery 的取消绑定事件不好用..
- var fD = '#freedown';
- ubA($(fD)[0]);
-
- // 因为重新绑定了事件,也就是重写了一次代码,因此需要刷新一次查询处理。
- $(fD).bind('click', function () {
- l.href = jPrintf("http://69.197.155.141:7001/download.ashx?a=0,$1,0", win.download.fileOnlyCode);
- }).attr({
- 'value': '下载文件'
- });
- */
- break;
-
- case "everbox.com":
-
- // 页面调整
- $('.report, #footer, #sharecopy, #sidebar').hide();
- $('h3#linkTitle').css({
- 'overflow': 'hidden',
- 'text-overflow': 'ellipsis'
- });
- $('#wrapper').css({
- 'width': '100%'
- });
-
- function eveBox(r) {
- var code = r.code;
- if (code == 200) {
- l.href = r.data.dataurl;
- } else if (code == 412) {
- win.everbox.notice({
- "msg": '匿名下载已达上限, 脚本无力回天',
- "autoHide": false,
- "msgType": "error"
- });
- } else {
- win.everbox.notice({
- "msg": '无法识别的错误码 ' + code + ', 请报告于<a href="' + bugRepUrl + '" target="_blank">此处</a>, 谢谢.',
- "autoHide": false,
- "msgType": "error"
- });
- }
- }
-
- // 免插件下载解析
- ubA($("#download_button")[0]);
- $("#download_button").bind("click", function () {
- var postData = {};
- postData[win.everbox.csrfKey] = win.everbox.csrfVal;
-
- $.ajax({
- type: "POST",
- url: "/f/download/" + win.linkid,
- data: postData,
- dataType: "json",
- success: eveBox
- });
- });
- break;
-
- case '79pan.com':
- chkDU();
- $('iframe, #code_box, #down_box2').remove();
- $('#down_box').show();
- break;
-
- case "supan.la":
- win.update_sec = eFunc;
- win.down_file_link();
- win.down_file_link = eFunc;
- $('.file_item').css('height', 'auto');
- break;
-
- case "87pan.com":
- chkDU();
- $('script,.view-gg,#view-gg').remove();
- break;
-
- case "azpan.com":
- chkDU();
- document.onkeydown = eFunc;
- $('script, iframe').remove();
- forceHide ('a[id*="Union"]');
- break;
-
- case "dd.ma":
- var aLink = $('#btn_open a.link1').attr('href');
-
- if (!aLink)
- break;
- l.href = aLink;
- break;
-
- case '9pan.net':
- l.href = '/down-' + l.pathname.match(/\d+/) + '.html';
- break;
-
- case 'xddisk.com':
- case 'nyhx.com':
- chkDU();
- break;
-
- case '9ku.com':
- $('#play_musicname').bind('DOMSubtreeModified', function () {
- $('.ringDown').hide().next().find('a:last').removeAttr('onclick')
- .attr('href', win.firstplay).css({
- 'font-weight': 'bold'
- });
- }).find('a').attr('active', '1');
-
- forceHide ('#LR2,#LR3,#seegc');
- break;
-
- case '565656.com':
- $('#down_ring').bind('DOMSubtreeModified', function () {
- var _addMp3Link = function (song, $dlBut) {
- $.ajax({
- type: "GET",
- cache: true,
- url: "/plus/UrlSearch.ashx",
- data: {
- n: song.songname,
- s: song.singername
- },
- dataType: "json",
- success: function (data) {
- $dlBut.text('MP3 格式')
- .attr('title', '下载 MP3 版: ' + song.songname)
- .attr('href', data[0]);
- // TODO: AddLink (data[0]);
- }
- });
- };
-
- var _getUrl = function (url) {
- if (url.toLowerCase().indexOf("http://") >= 0) {
- return url;
- } else if (url.toLowerCase().indexOf(".m4a") >= 0) {
- return win.listen_server_mp4 + url;
- } else {
- return win.listen_server + url;
- }
- };
-
- var song = win.splayer.musicinfo();
- setTimeout(function () {
- song.url = song.url.replace(/mp3$/i, '$1m4a').replace(/^\//, '');
- var $dlBut = $('.play-info-otheropt a:last').prev()
- .text('下载: ' + song.songname)
- .attr('title', '下载: ' + song.songname)
- .attr('href', _getUrl(song.url)).next();
-
- _addMp3Link(song, $dlBut);
- }, 500);
- });
- break;
-
- case 'djye.com':
- $('#djInfo').bind('DOMSubtreeModified', function () {
- var a = $('a[href^="/down.html"]').attr('href', win.firstplay);
- a.attr('title', '下载: ' + $('#play_musicname').text()).css({
- 'background': 'url(/images/mp3_down.gif)',
- 'padding': '3px 0 5px 9px'
- }).find('img').remove();
- a.clone().css({
- 'background-position': '-184px',
- 'padding': '3px 0 5px 34px'
- }).insertAfter(a);
- log($('a[title^="下载:"]'));
- });
- break;
-
- case 'djcc.com':
- var a = $('#formusicbox'),
- b = a.clone().insertAfter(a);
- a.parent().animate({
- 'height': '+=27'
- }, 1000);
- b.removeAttr('onclick').text('下载该曲').css({
- 'background-color': 'lightgrey'
- });
- $('.playbox .playstate').bind('DOMSubtreeModified', function () {
- var song = win.jwplayer(win._$[16]).getPlaylistItem();
- b.attr('title', '下载: ' + song.title).attr('href', song.file);
- });
-
- // Ad.Kill
- $('.left').animate({
- 'width': '0'
- }, 1000, function () {
- $(this).remove();
- });
- $('.left').animate({
- 'width': '0'
- }, 1000, function () {
- $(this).remove();
- });
- $('.center').css({
- 'margin-top': '12px',
- 'margin-left': '240px'
- });
- $('.p3').css('background', 'none');
- $('.right').animate({
- 'width': '0',
- 'left': '310'
- }, 1000, function () {
- $(this).remove();
- });
- $('[class*="banner"]').remove();
- $('#playlistads').remove();
- break;
-
- case 'ref.so':
- safeJump($('#btn_open a').attr('href'));
- break;
-
- case 'upan.so':
- var selector = 'img[src*="liulan.jpg"]';
- execIfVarDefined(function () {
- return $(selector).length;
- }, function () {
- safeJump($(selector).parent().attr('href'));
- });
-
- break;
-
- case 'dc2.us':
- case 't00y.com':
- var selector = '#skip_button, #downloadlist a';
- execIfVarDefined(function () {
- return $(selector).length;
- }, function () {
- $('iframe, embed, object').remove();
- forceHideFrames();
- clearCookie();
- if (!safeJump($(selector).attr('href')) && win.jumpToURL)
- win.jumpToURL();
- });
- break;
-
- case 'csdn.net':
- // 参考代码 CSDN 免登录, UsoId: 165091
- var downloadId = parseInt((location.href.match(/\/(\d+)/) || [, ''])[1])
- /*,
- dlPoint = parseInt(($('.info li:eq(2)').html().match(/\d/)||[0])[0])*/
- ;
-
- // 检查是否为正确页面//以及下载是否需要积分
- if (!downloadId /* || !dlPoint*/ )
- return;
-
- $.ajax({
- url: "/index.php/rest/source/getsourceinfo/" + downloadId
- }).fail(function () {
- $('.vip').append('免积分下载失败!');
- }).done(function (data) {
- var $vip = $('.vip'),
- $a = $vip.find('a:first'),
- arrProp = JSON.parse(data);
-
- if (!arrProp.url) {
- $vip.append('免积分下载失败!');
- return;
- }
-
- $vip.css({
- 'margin-bottom': '40px'
- });
- $a.html('').attr('href', arrProp.url).css({
- 'background': 'url(/images/btn_down_vip.png) no-repeat',
- 'padding': '0 100px 40px 0'
- }).attr('title', '单击免积分下载');
- $a.clone().css({
- 'padding-right': '153px',
- 'background-position-x': '-145px'
- }).insertAfter($a);
- $a.clone().css({
- 'padding-right': '46px',
- 'background-position-x': '-6px'
- }).insertAfter($a);
- });
- /*
- var sDlAddr = 'http://www.poboke.com/wp-content/themes/QQ/csdnformac.php?token='
- + hex_md5(hex_md5('sunofbeach' + downloadId)) + '&id=' + downloadId;
-
- GM_xmlhttpRequest({
- method: "GET",
- url: sDlAddr,
- onload: function(r) {
- var $vip = $('.vip'),
- $a = $vip.find('a:first');
- if (!/http/.test(r.responseText)) {
- $vip.append('免积分下载失败!');
- return;
- }
- $vip.css({
- 'margin-bottom': '40px'
- });
- $a.html('').attr('href', r.responseText).css({
- 'background': 'url(/images/btn_down_vip.png) no-repeat',
- 'padding': '0 100px 40px 0'
- }).attr('title', '单击免积分下载');
- $a.clone().css({
- 'padding-right': '153px',
- 'background-position-x': '-145px'
- }).insertAfter($a);
- $a.clone().css({
- 'padding-right': '46px',
- 'background-position-x': '-6px'
- }).insertAfter($a);
- }
- });
- */
-
- break;
-
- default:
- // log ('该域名未获得匹配,请联系作者修正该问题!');
- // Do nothing.
- }
- }, 1);
- });
-
-
-
- document.addEventListener('readystatechange', function () {
-
- console.log('readystatechange: ' + document.readyState);
-
- if (document.readyState != 'complete')
- return;
-
- log('网页已完整加载。');
- switch (dhost) {
- case "87pan.com":
- case "bpan.net":
- $('script,.view-gg,#view-gg').remove();
- break;
-
- case 'duole.com':
- var a = $('#player_right .last'),
- b = a.clone();
-
- $('#player_right').animate({
- 'width': '+=32'
- }, 500);
- $('a.music_info').css({
- 'cursor': 'text'
- }).bind('DOMAttrModified', function () {
- if (this.hasAttribute('href'))
- this.removeAttribute('href');
- });
- b.insertBefore(a.prev()).removeClass('last').css({
- 'width': '0',
- 'display': 'inline',
- 'background-position': '-150px -104px'
- }).css(makeRotateCss(90)).animate({
- 'width': '+=32'
- }, 500).attr('target', '_blank');
-
- var oldPlayNew = win.duolePlayer.playNew;
- win.duolePlayer.playNew = function (t, n) {
- b.attr('href', t).attr('title', '单击下载: ' + this.curMusic.song_name);
- return oldPlayNew(t, n);
- };
- break;
- case '1ting.com':
- log('1ting 解析启动 :: ' + '等待播放器加载');
-
- execIfVarDefined('yiting', function () {
- log('1ting 解析启动 :: ' + '播放器加载完毕,开始函数绑定…');
- var getCurrentSongLink = function () {
- return win.yiting.player.entity.Source;
- }
-
- // 防止下方函数绑定失效
- win.$YV.down = function () {
- l.href = getCurrentSongLink();
- }
-
- win.yiting.player.hook('play', function () {
- $('.songact a.down').attr('href', getCurrentSongLink())
- .removeAttr('onclick').css('border', '1px lightgrey dashed');
- });
- // 启动时强制刷新下载地址
- win.yiting.player.hook('play');
- log('1ting 解析启动 :: ' + '绑定完毕,单击原始下载按钮即可下载。');
-
-
- });
- break;
-
- case "ctdisk.com":
- case "pipipan.com":
- case "400gb.com":
- case "bego.cc":
- log('开始执行 城通 旗下网盘系列简化验证码。');
-
- setTimeout (function () {
- win.chkform = tFunc;
- $('.kk_xshow').remove();
- forceHide ('div.span6:first-child');
- $('.captcha').hide('slow');
- $('.captcha_right').css('float', 'left');
-
- $('#vfcode:first').parent()
- .append(createNumPad(4, $('#randcode')[0], function () {
- $('[name="user_form"]').submit();
- }));
- log('Finish 城通 旗下网盘系列简化验证码。');
- }, 10);
-
- // 下载支持加强 (貌似没用…?)
- var thunderLink = $('.freelist .thunder'),
- nDlBtn = $('<a class="local">');
- if (thunderLink.length)
- nDlBtn.text('下载器链接 (?)').attr('href', linkConv(thunderLink[0].outerHTML)).insertBefore (thunderLink);
- break;
- case "xiami.com":
- win.player_download = function (sId) {
- // 读取原始歌曲地址
- var SongUrl = $($.ajax({
- type: 'GET',
- url: '/song/playlist/id/' + sId.songId + '/object_name/default/object_id/0',
- cache: true,
- /* 从缓存读,反正如果没记录可以跑到服务器找 */
- async: false
- }).responseText).find('location').html();
- log('虾米解析 :: 歌曲ID [ ' + sId + ' ] :: 解密地址 :: ' + SongUrl);
- // 开始解密...
- SongUrl = (function (sLocation) {
- var num = Number(sLocation.charAt(0)),
- inp = sLocation.substr(1),
- iLe = inp.length % num,
- a = 0,
- ret = '',
- arr = [];
- for (var i = 0; i < num; i++) {
- arr[i] = (iLe > i ? 1 : 0) + (inp.length - iLe) / num;
- }
- for (var i = 0; i < arr[1]; i++) {
- a = 0;
- for (var j = 0; j < num; j++) {
- ret += inp.charAt(a + i);
- a += arr[j];
- }
- }
- return unescape(ret.substr(0, inp.length)).replace(/\^/g, '0').replace(/\+/g, ' ');
- })(SongUrl);
- log('虾米解析 :: 歌曲ID [ ' + sId + ' ] :: 开启窗口 :: ' + SongUrl);
- // 开启窗口...
- win.open(SongUrl);
- };
- break;
-
- case "dbank.com":
- case "vmall.com":
- win.adSend = eFunc;
-
- function eI(aList, t, fCallback) {
- var fId = false,
- ret = {};
- console.log('Process: ', aList);
- for (var i = 0; i < aList.length; i++) {
- console.log('Check the aList[' + i + '] :: ', aList[i]);
- ret = fCallback(aList[i], t);
- if (ret.ret) {
- console.log('URL GET :: ' + aList[i].downloadurl);
- fId = aList[i].downloadurl;
- break;
- } else if (aList[i].childList) {
- console.log('NEXT TRY: aList[' + i + '] :: ' + aList[i].childList);
- fId = eI(aList[i].childList, t, fCallback);
- if (fId) {
- return fId
- }
- }
- }
- return fId;
- }
-
- // 下载解析
- var iNv = setInterval(function () {
- if (!win.dbank.securelink.downloadfile) {
- return;
- } // 等待初始化
- clearInterval(iNv);
- log('dBank 解析 :: 文件列表加载完毕。');
- win.dbank.securelink.setStat = win.dbank.hsdownload.checkResourceSelected = eFunc; // dBank 特殊解析
- win.dbank.securelink.downloadfile = function (ahref) {
- var fList = win.globallinkdata.data.resource.files,
- fId = eI(fList, ahref.id, function (l, t) {
- return ((l.id == t) ? {
- ret: 1
- } : {})
- });
-
- if (!fId) {
- prompt('无法解析其真实地址,可能因为网站改版导致脚本失效..\n\n请提交问题和发生错误的地址到下列地址:', bugRepUrl);
- return;
- }
- var rA = win.dbank.crt.decrypt(fId, this.encrykey);
- log('dBank 解析 :: ' + rA);
- win.open(rA, 'CUWCLFC ' + sVer + fId);
- };
-
- // 判断是否提示需要 VIP 帐号转存
- if ($('#hsdownload').length == 0) {
- eI(win.globallinkdata.data.resource.files, 0, function (l) {
- $('a#' + l.id).click(function () {
- win.dbank.securelink.downloadfile(this);
- })
- .attr('href', 'javascript:void(0);');
- });
- } else {
- // 高速下载按钮拦截
- ubA($('#hsdownload')[0]);
- $('#hsdownload').click(function () {
- $('#down_filelist .list-select input[type="checkbox"]').each(function () {
- if ($(this).prop('checked')) {
- win.dbank.securelink.downloadfile($(this).parent().parent().find('span.list-tit a[id]')[0]);
- }
- })
- });
- log('dBank 解析 :: 解析函数已绑定');
- }
- }, 100);
- break;
-
- case "5sing.com":
- // 播放列表的下载按钮。
- $('a[href*="Down.aspx?sid="]')
- .each(function (i) {
- $(this).attr({
- 'href': win.wsplayer.playList[i].mp3,
- 'title': '下载 ' + win.wsplayer.playList[i].songname,
- 'target': '_blank'
- })
- });
- break;
-
- case 'douban.fm':
- // 参考代码 豆藤, UsoId: 49911
- var $a = $('<a>').css({
- 'background': '#9DD6C5',
- 'padding': '3px 5px',
- 'color': 'white'
- }).text('下载').hover(function () {
- $(this).css({
- 'margin-left': '5px',
- 'padding-left': '10px',
- 'background': '#BAE2D6'
- });
- }, function () {
- $(this).css({
- 'margin-left': '0',
- 'padding-left': '5px',
- 'background': '#9DD6C5'
- });
- }).css(makeDelayCss())
- .attr('target', '_blank');
- var $div = $('<div>').css({
- 'float': 'right',
- 'margin-top': '-230px',
- 'margin-right': '-32px',
- 'font-weight': 'bold',
- 'font-family': '微软雅黑'
- }).append($a).insertAfter('.player-wrap');
-
- log('等待豆瓣电台加载…');
-
- execIfVarDefined('extStatusHandler', function () {
- log('豆瓣电台加载完毕! 开始绑定函数…');
- var oldExtStatusHandler = win.extStatusHandler;
- win.extStatusHandler = function (p) {
- var a = JSON.parse(p);
- if ('start' == a.type && a.song) {
- $a.attr('href', a.song.url)
- .attr('title', '右键另存下载: ' + a.song.title);
-
- log(a.song.title + ' :: ' + a.song.url);
- }
- return oldExtStatusHandler(p);
- }
- log('函数绑定完毕, Enjoy~');
-
- });
- break;
- }
- }, false);
- })();
- /*
- * 简单成就下载 by Yulei 本脚本只作学习研究参考用,版权所有 不得滥用、它用,后果自负
- *
- × Chrome 兼容 + 加强 by jixun66
- * 个人修正内容请参考:
- * http://userscripts.org/scripts/show/157621#full_description
- *
- */