Greasy Fork

Greasy Fork is available in English.

搜索引擎去广告

谷歌百度搜狗神马必应搜索去广告,适配电脑和手机

当前为 2021-12-22 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name 搜索引擎去广告
// @author 大萌主
// @description 谷歌百度搜狗神马必应搜索去广告,适配电脑和手机
// @version 6
// @match *://www.google.ca/*
// @match *://www.google.co.jp/*
// @match *://www.google.com.hk/*
// @match *://www.google.com/*
// @match *://m.baidu.com/*
// @match *://www.baidu.com/*
// @match *://m.sm.cn/*
// @match *://yz.m.sm.cn/*
// @match *://wap.sogou.com/*
// @match *://www.sogou.com/*
// @match *://cn.bing.com/*
// @match *://www.bing.com/*
// @run-at document-start
// @namespace http://greasyfork.icu/users/452911
// ==/UserScript==

(function(){
function remove(sel) {
  document.querySelectorAll(sel).forEach( a => a.remove());
}
var g_times = 0;
function myfun() {
function removeads() {
remove(".ec_wise_ad");
remove(".se-recommend-word-list-container");
remove("#se-recommend-word-list-container");
remove('[class*="ball-wrapper"]');
remove('[style="position: fixed; bottom: 0px; left: 0px; z-index: 300; width: 100%; height: 52px; background: rgb(255, 255, 255); opacity: 1; border-top: 1px solid rgb(224, 224, 224); display: flex;"]');
remove('[ad_dot_url*="http"]');
remove(".dl-banner-without-logo");
remove(".ad_result");
remove(".ad_sc");
remove('[data-text-ad="1"]');
remove('#content_left > *:not([id]) *');
remove('[class="result c-container new-pmd"][id="1"][tpl="se_com_default"][data-click="{"]');
remove(".biz_sponsor");
remove(".b_ad");
remove(".b_algospacing");
remove('[class="sb_add sb_adTA"]');
remove('div.b_caption > p[class]');
remove('.b_algo>h2>.b_caption>li');
}
removeads();
window.setTimeout(removeads);
 if(g_times >= 9999) {
   window.clearInterval(timer);
 }
 g_times ++;
}
var timer = setInterval(myfun,150);
myfun();
})();