🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

Annoying Ad blocker

Prevents annoying ads from displaying

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

// ==UserScript==
// @name        Annoying Ad blocker
// @description Prevents annoying ads from displaying
// @version     2017.08.55
// @match     *://*.amazon.com/*
// @match     *://*.bing.com/*
// @match     *://*.alltrails.com/*
// @match     *://*.ebay.com/*
// @match     *://*.thepiratebay.org/*
// @match     *://*.youtube.com/*
// @match     *://*.stackoverflow.com/*
// @match     *://*.finance.yahoo.com/*
// @match     *://*.dndbeyond.com/*
// @namespace   https://openuserjs.org/users/nonedude
// @require     http://code.jquery.com/jquery-1.11.1.min.js
// @license MIT
// ==/UserScript==

String.prototype.contains = function (it) { return this.indexOf(it) !== -1; };

var ssss = location.href;


function dndbeyond()
{
	$(".header-wrapper").remove();
	$("#site-main").css("background-color", "black");
        $("html").css("background-color", "black");
	$("[id^=cookie-consent-banner]").remove();
	$("footer").remove();
}

function thepiratebay()
{
	$("iframe").remove();
}
function amazon()
{
	window.pdagSparkleClientContext = {};
	$("#pdagDesktopSparkleHeadlineContainer").remove();
	$("#sponsoredLinksCsaIframe").remove();
	$("#reports-ads-abuse").remove();
	$("#sponsoredLinksCSA").remove();
	$("#amsSparkleAdWrapper").remove();
	$("#pdagEncapsulated").remove();
	$(".slot__ad").remove();
	$("#adblk_yes").remove();
	$("#adblk_no").remove();
	$("#adblk_unk").remove();

	$("#sponsoredLinksCsaIframe").html("");
	$("#reports-ads-abuse").html("");
	$("#sponsoredLinksCSA").html("");
	$("#amsSparkleAdWrapper").html("");

	$(".s-sponsored-list-header").each(function (index, value)
	{
		$(this).parent().parent().remove();
	});

	$(".s-sponsored-info-icon").each(function (index, value)
	{
		$(this).parent().parent().parent().parent().remove();
	});

	console.log(new Date().getTime());
}

function bing()
{
	$(".b_ad").remove();
}

function ebay()
{
	$("[id^='wrapperDiv_rtm']").remove();
	$("[id^='scandal']").remove();
	$("[id^='rtm-mb']").remove();
	$(".mfe-cards").html("");
	$("[id^='wrapperDiv_rtm']").html("");
	$(".promoted-lv").parent().remove();
	$(".merch-module").remove();
	$(".s-item__title-tag").each(function (index, value)
	{
		$(this).parent().parent().parent().parent().parent().parent().remove();
	});
}
function youtube()
{
	//$(".ytd-secondary-search-container-renderer").remove();
	//$("ytd-secondary-search-container-renderer").remove();
	$("#main").remove();

        $(".yt-mealbar-promo-renderer").remove();
}
function stackoverflow()
{
	$(".js-consent-banner").remove();
}

function yahoo()
{
	$(".YDC-Overlay").remove();
	$("#dropdown-menu").remove();
}

function alltrails()
{
    console.log(new Date().getTime());
	$("#modalPortal").remove();
}






if (ssss.contains("ebay"))
{
	ebay();
	window.setInterval(function ()
	{
		ebay();
	}, 1000);

}
if (ssss.contains("bing"))
{
	bing();
	window.setInterval(function ()
	{
		bing();
	}, 1000);
}

if (ssss.contains("amazon"))
{
	amazon();
	window.setInterval(function ()
	{
		amazon();
	}, 1000);
}

if (ssss.contains("thepiratebay"))
{
	piratebay();
	window.setInterval(function ()
	{
		piratebay();
	}, 1000);
}
if (ssss.contains("youtube"))
{
	youtube();
	window.setInterval(function ()
	{
		youtube();
	}, 1000);
}
if (ssss.contains("stackoverflow"))
{
	stackoverflow();
	window.setInterval(function ()
	{
		stackoverflow();
	}, 1000);
}
if (ssss.contains("yahoo"))
{
	yahoo();
	window.setInterval(function ()
	{
		yahoo();
	}, 1000);
}
if (ssss.contains("dndbeyond"))
{
	dndbeyond();
	window.setInterval(function ()
	{
		dndbeyond();
	}, 1000);
}

if (ssss.contains("alltrails"))
{
	alltrails();
	window.setInterval(function ()
	{
		alltrails();
	}, 1000);
}