全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 8049|回复: 11

[Windows VPS] 求一个现在能用的谷歌浏览器去优酷广告插件~~~

[复制链接]
发表于 2013-7-13 19:48:25 | 显示全部楼层 |阅读模式
求一个现在能用的谷歌浏览器去优酷广告插件~~~
发表于 2013-7-13 19:49:01 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
 楼主| 发表于 2013-7-13 19:51:57 | 显示全部楼层
ekucn 发表于 2013-7-13 19:49
AdSafe
或者 AdMunch
通用所有浏览器

怎么搜索不到呢 绿帽哥
发表于 2013-7-13 19:53:53 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
 楼主| 发表于 2013-7-13 19:55:01 | 显示全部楼层
ekucn 发表于 2013-7-13 19:53
你用的火星搜索引擎吧
http://www.baidu.com/baidu?wd=AdSafe

哥还以为你指的是谷歌应用
发表于 2013-7-13 19:56:11 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2013-7-13 19:57:03 | 显示全部楼层
有的
发表于 2013-7-13 21:33:42 | 显示全部楼层
  1. // ==UserScript==
  2. // @name OpenGG.Clean.Player(Bae
  3. // @author Anonymous
  4. // @description 通过替换swf播放器的方式来解决优酷的黑屏广告+Bilibili黑科技 In God,We Turst.
  5. // @version 1.366.2
  6. // @namespace http://userscripts.org/users/Kawaiiushio
  7. // @updateURL https://userscripts.org/scripts/source/162286.meta.js
  8. // @downloadURL https://userscripts.org/scripts/source/162286.user.js
  9. // @icon http://extensiondl.maxthon.cn/skinpack/17276781/1366787326/icons/icon_48.png
  10. // @include http://*/*
  11. // @include https://*/*
  12. // ==/UserScript==

  13. /*
  14. * === 说明 ===
  15. * 本脚本参考http://bbs.kafan.cn/thread-1514537-1-1.html 感谢卡饭大神
  16. * Chrome用户也可以使用Adkill and Media download这个扩展
  17. * 此脚本设计修改人员OpenGG  Harv  xplsy  15536900  yndoc  KawaiiUshio 5B4B铅笔
  18. * Bilibili黑科技由FireAway提供      参考:http://userscripts.org/scripts/show/165424
  19. * Opera兼容部分由Gerald修改
  20. * In God,We Trust.
  21. * THX.
  22. */

  23. /*
  24. * Love Jiani
  25. */
  26. (function() {
  27.     Function.prototype.bind = function() {
  28.         var fn = this, args = Array.prototype.slice.call(arguments), obj = args.shift();
  29.         return function() {
  30.             return fn.apply(obj, args.concat(Array.prototype.slice.call(arguments)));
  31.         };
  32.     };

  33.     function YoukuAntiAds() {}
  34.     YoukuAntiAds.prototype = {
  35.         _players: null,
  36.         _rules: null,
  37.         _done: null,
  38.         get players() {
  39.             if(!this._players) {
  40.                 this._players = {
  41.                     'youku': 'http://lovejiani.cdn.duapp.com/kafan/loader.swf',
  42.                     'ku6': 'http://lovejiani.cdn.duapp.com/kafan/ku6.swf',
  43.                     'iqiyi': 'http://lovejiani.cdn.duapp.com/kafan/iqiyi.swf',
  44.                     'iqiyi5': 'http://lovejiani.cdn.duapp.com/kafan/iqiyi5.swf',
  45.                     'tudou': 'http://lovejiani.cdn.duapp.com/kafan/tudou.swf',
  46.                     'tudou_olc': 'http://lovejiani.cdn.duapp.com/kafan/olc_8.swf',
  47.                     'tudou_sp': 'http://lovejiani.cdn.duapp.com/kafan/sp.swf',
  48.                                         'letv': 'http://lovejiani.cdn.duapp.com/kafan/letv.swf'
  49.                 };
  50.             }
  51.             return this._players;
  52.         },
  53.         get rules() {
  54.             if(!this._rules) {
  55.                 this._rules = {
  56.                     'youku': {
  57.                         'find': /^http:\/\/static\.youku\.com(\/v[\d\.]+)?\/v\/swf\/(loader|q?player[^\.]*)\.swf/i,
  58.                         'replace': this.players['youku']
  59.                     },
  60.                     'youku_out': {
  61.                         'find': /^http:\/\/player\.youku\.com\/player\.php\/.*sid\/([\w=]+).*(\/v)?\.swf.*/i,
  62.                         'replace': this.players['youku'] + '?showAd=0&VideoIDS=$1'
  63.                     },
  64.                     'ku6': {
  65.                         'find': /^http:\/\/player\.ku6cdn\.com\/default\/.*\/\d+\/player\.swf/i,
  66.                         'replace': this.players['ku6']
  67.                     },
  68.                     'ku6_out': {
  69.                         'find': /^http:\/\/player\.ku6\.com\/(inside|refer)\/([^\/]+)\/v\.swf.*/i,
  70.                         'replace': this.players['ku6'] + '?vid=$2'
  71.                     },
  72.                     'letv1': {
  73.                         'find': /^http:\/\/.*letv[\w]*\.com\/[^\.]*\/.*player\/((?!Live).*)Player[^\.]*\.swf/i,
  74.                         'replace': this.players['letv']
  75.                     },
  76.                     'letv2': {
  77.                         'find': /^http:\/\/.*letv[\w]*\.com\/.*player[^\.]*\.swf\?v_list=[\d]/i,
  78.                         'replace': this.players['letv']
  79.                     },
  80.                     'letv3': {
  81.                         'find': /^http:\/\/.*letv[\w]*\.com\/.*\/v_list=[\d]*\/\.swf/i,
  82.                         'replace': this.players['letv']
  83.                     },
  84.                     'iqiyi': {
  85.                         'find': /^http:\/\/www\.iqiyi\.com\/player\/\d+\/player\.swf/i,
  86.                         'replace': this.players['iqiyi']
  87.                     },
  88.                     'iqiyi_out': {
  89.                         'find': /^http:\/\/(player|dispatcher)\.video\.i?qiyi\.com\/(.*[\?&]vid=)?([^\/&]+).*/i,
  90.                         'replace': this.players['iqiyi5'] + '?vid=$3'
  91.                     },
  92.                     'tudou': {
  93.                         'find': /^http:\/\/js\.tudouui\.com\/.*player[^\.]*\.swf/i,
  94.                         'replace': this.players['tudou']
  95.                     },
  96.                     'tudou_out': {
  97.                         'find': /^http:\/\/www\.tudou\.com\/.*(\/v\.swf)?/i,
  98.                         'replace': this.players['tudou_olc'] + '?tvcCode=-1&swfPath=' + this.players['tudou_sp']
  99.                     }
  100.                 }
  101.             }
  102.             return this._rules;
  103.         },
  104.         get done() {
  105.             if(!this._done) {
  106.                 this._done = new Array();
  107.             }
  108.             return this._done;
  109.         },
  110.         initPreHandlers: function() {
  111.             this.rules['iqiyi']['preHandle'] = function(elem, find, replace, player) {
  112.                 if(document.querySelector('span[data-flashplayerparam-flashurl]')) {
  113.                     replace = this.players['iqiyi5'];
  114.                 }
  115.                 this.reallyReplace.bind(this, elem, find, replace)();
  116.             }
  117.             this.rules['tudou_out']['preHandle'] = function(elem, find, replace, player) {
  118.                 var fn = this;
  119.                 var isFx = /firefox/i.test(navigator.userAgent);
  120.                 GM_xmlhttpRequest({
  121.                     method: isFx ? 'HEAD' : 'GET',
  122.                     url: isFx ? player : 'https://query.yahooapis.com/v1/public/yql?format=json&q=' + encodeURIComponent('use"https://haoutil.googlecode.com/svn/trunk/firefox/tudou_redirect.yql.xml" as tudou; select * from tudou where url="' + player + '" and referer="' + window.location.href + '"'),
  123.                     onload: function(response) {
  124.                         var finalUrl = (isFx ? response.finalUrl : response.responseText);
  125.                         var match = finalUrl.match(/(iid|youkuid|resourceid|autoplay|snap_pic)=[^&]+/ig);
  126.                         if(match && !/error/i.test(finalUrl)) {
  127.                             replace += '&' + match.join('&');
  128.                             fn.reallyReplace.bind(fn, elem, find, replace)();
  129.                         }
  130.                     }
  131.                 });
  132.             }
  133.         },
  134.         addAnimations: function() {
  135.             var style = document.createElement('style');
  136.             style.type = 'text/css';
  137.             style.innerHTML = 'object,embed{\
  138. -webkit-animation-duration:.001s;-webkit-animation-name:playerInserted;\
  139. -ms-animation-duration:.001s;-ms-animation-name:playerInserted;\
  140. -o-animation-duration:.001s;-o-animation-name:playerInserted;\
  141. animation-duration:.001s;animation-name:playerInserted;}\
  142. @-webkit-keyframes playerInserted{from{opacity:0.99;}to{opacity:1;}}\
  143. @-ms-keyframes playerInserted{from{opacity:0.99;}to{opacity:1;}}\
  144. @-o-keyframes playerInserted{from{opacity:0.99;}to{opacity:1;}}\
  145. @keyframes playerInserted{from{opacity:0.99;}to{opacity:1;}}';
  146.             document.getElementsByTagName('head')[0].appendChild(style);
  147.         },
  148.         animationsHandler: function(e) {
  149.             if(e.animationName === 'playerInserted') {
  150.                 this.replace(e.target);
  151.             }
  152.         },
  153.         replace: function(elem) {
  154.             if(this.done.indexOf(elem) != -1) return;
  155.             this.done.push(elem);

  156.             var player = elem.data || elem.src;
  157.             if(!player) return;

  158.             var i, find, replace, isReplacing = false;
  159.             for(i in this.rules) {
  160.                 find = this.rules[i]['find'];
  161.                 if(find.test(player)) {
  162.                     replace = this.rules[i]['replace'];
  163.                     if('function' === typeof this.rules[i]['preHandle']) {
  164.                         isReplacing = true;
  165.                         this.rules[i]['preHandle'].bind(this, elem, find, replace, player)();
  166.                     }
  167.                     if(!isReplacing) {
  168.                         this.reallyReplace.bind(this, elem, find, replace)();
  169.                     }
  170.                     break;
  171.                 }
  172.             }
  173.         },
  174.         reallyReplace: function(elem, find, replace) {
  175.             elem.data && (elem.data = elem.data.replace(find, replace)) || elem.src && ((elem.src = elem.src.replace(find, replace)) && (elem.style.display = 'block'));
  176.             this.reloadPlugin(elem);
  177.         },
  178.         reloadPlugin: function(elem) {
  179.             var nextSibling = elem.nextSibling;
  180.             var parentNode = elem.parentNode;
  181.             parentNode.removeChild(elem);
  182.             var newElem = elem.cloneNode(true);
  183.             this.done.push(newElem);
  184.             if(nextSibling) {
  185.                 parentNode.insertBefore(newElem, nextSibling);
  186.             } else {
  187.                 parentNode.appendChild(newElem);
  188.             }
  189.         },
  190.         init: function() {
  191.             this.initPreHandlers();

  192.             var handler = this.animationsHandler.bind(this);

  193.             document.body.addEventListener('webkitAnimationStart', handler, false);
  194.             document.body.addEventListener('msAnimationStart', handler, false);
  195.             document.body.addEventListener('oAnimationStart', handler, false);
  196.             document.body.addEventListener('animationstart', handler, false);

  197.             this.addAnimations();
  198.         }
  199.     };

  200.     new YoukuAntiAds().init();
  201. })();
复制代码
保持.JS直接拖进chrome

点评

谢谢 ,用楼下的了  发表于 2013-7-13 23:07
发表于 2013-7-13 21:38:04 | 显示全部楼层
Adkill  我在用这个

点评

这个可以有!  发表于 2013-7-13 23:05
发表于 2013-7-14 00:59:07 | 显示全部楼层
用奶牛的 不错
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-4-18 22:11 , Processed in 0.131643 second(s), 14 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表