Etarg ad remover

Removes ad banners by etarg (use with Ublock Origin or Adblock Plus)

目前為 2016-07-16 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Etarg ad remover
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Removes ad banners by etarg (use with Ublock Origin or Adblock Plus)
// @author       hant0508
// @include      *
// @grant        none
// ==/UserScript==

var snapResults;
var tries = 0;

function rem()
{
    for (var i = snapResults.snapshotLength - 1; i >= 0; i--)
    {
        var elm = snapResults.snapshotItem(i);
        elm.parentNode.removeChild(elm);
    }
}

function xpath()
{
    var regex = "/html/body//div[@onclick and ./table/tr/td/a[contains(@href, 'et-code.ru')]]";
    snapResults = document.evaluate(regex, document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);

    if (tries <= 20)
    {
        window.setTimeout(xpath,100);
        if (snapResults.snapshotLength !== 0) tries = 0;
        tries++;
    }

    rem();
}

xpath();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址