Injectable AdBlocker

Simple AdBlocker

当前为 2021-02-24 提交的版本,查看 最新版本

// ==UserScript==
// @name         Injectable AdBlocker
// @namespace    AD BLOCK_:)
// @version      1-beta
// @description  Simple AdBlocker
// @author       CyberMafia
// @match        *://*/*
// @grant        dev
// ==/UserScript==

(function removeAdvertisementAndBlockingElements () {
    $('.inRek').remove();
    $('.mgbox').remove();

    Array.from(document.getElementsByTagName("img")).forEach(function (e) {
        if (!e.src.includes(window.location.host)) {
            e.remove()
        }
    });

    Array.from(document.getElementsByTagName("div")).forEach(function (e) {
        var currentZIndex = parseInt(document.defaultView.getComputedStyle(e, null).zIndex);
        if (currentZIndex > 999) {
            console.log(parseInt(currentZIndex));
            e.remove()
        }
    });
})();

QingJ © 2025

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