// ==UserScript== // @name 去百度搜索置顶推广 (ECMA6) // @author axetroy // @contributor axetroy // @description 去除插入在百度搜索结果头部、尾部的推广链接。 // @version 2016.4.12 // @grant none // @include *www.baidu.com* // @include *zhidao.baidu.com/search* // @connect * // @supportURL http://www.burningall.com // @compatible chrome 完美运行 // @compatible firefox 完美运行 // @run-at document-start // @contributionURL troy450409405@gmail.com|alipay.com // @namespace https://greasyfork.org/zh-CN/users/3400-axetroy // @license The MIT License (MIT); http://opensource.org/licenses/MIT // @downloadURL none // ==/UserScript== // Github源码:https://github.com/axetroy/GMscript/tree/master/remove_baidu_search_ads /* jshint ignore:start */ !function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gd||b.bottom<0||b.left>c||b.right<0,!e):void 0},b=function(a,b){var c=void 0;return function(){var d=this,e=arguments;window.clearTimeout(c),c=window.setTimeout(function(){a.apply(d,e)},b)}},c=function(){for(var a=arguments.length,b=Array(a),c=0;a>c;c++)b[c]=arguments[c];return Object.assign.apply(Object,[{}].concat(b))};return{visible:a,debounce:b,merge:c}}}]),a}(),h=function(){var a=arguments.length<=0||void 0===arguments[0]?"":arguments[0],b=arguments.length<=1||void 0===arguments[1]?document:arguments[1];return new g(a,b)};h.fn=g.fn,b.exports=h},{}],4:[function(a,b,c){"use strict";var d={rules:'\n #content_left>div\n :not([class*=result])\n :not([class*=container])\n :not(.leftBlock)\n :not(#rs_top_new)\n :not([filtered])\n ,\n #content_left>table\n :not(.result)\n :not([filtered])\n ,\n #content_right>table td\n div#ec_im_container\n ,\n div.s-news-list-wrapper>div\n :not([data-relatewords*="1"])\n ,\n div.list-wraper dl[data-oad]\n :not([data-fb])\n :not([filtered])\n '.trim().replace(/\n/gim,"").replace(/\s{1,}([^a-zA-Z])/g,"$1")};b.exports=d},{}],5:[function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var e=a("../libs/jqLite"),f=a("./config"),g=function(){function a(){var b=arguments.length<=0||void 0===arguments[0]?f.rules:arguments[0];d(this,a),this.ads=e(b),this.length=this.ads.length}return a.prototype.filter=function(){return this.ads.each(function(a,b){a.style.cssText="\n display:none !important;\n visibility:hidden !important;\n width:0 !important;\n height:0 !important;\n overflow:hidden !important;\n // background-color:red !important;\n // border:1px solid red;\n ",a.setAttribute("filtered","")}),this},a.prototype.turn=function(){return e("#content_left input[type=checkbox]:not(filtered)").each(function(a){a.checked=!1,a.setAttribute("filtered","")}),this},a}();b.exports=g},{"../libs/jqLite":3,"./config":4}]},{},[1]); //# sourceMappingURL=index.map /* jshint ignore:end */