feiszw_remove_advs

Remove divs of advertisements at https://m.feiszw.com

目前為 2022-09-20 提交的版本,檢視 最新版本

// ==UserScript==
// @name         feiszw_remove_advs
// @namespace    http://netoday.cn
// @version      0.1.2
// @description  Remove divs of advertisements at https://m.feiszw.com
// @author       crazy_pig
// @match        https://*/*
// @match        http://*/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // get url user visited
    var _url = (window.location + "").toLowerCase();

    // if need active script
    if (_url.indexOf("feiszw.com") > 0){
        // edit last theme to green
        _change_style();

        setInterval(function (){
            _recursion_set_style(document.body.children);
        }, 300);
    }
})();

function _change_style(){
    document.body.style = "font-family: \"Microsoft YaHei\"; background-color: #016974; padding-bottom: 130px;";
    document.getElementById("nr1").style = "font-size: 20px; line-height: 40px; color: #E4DD40;";
}

/**
 * set font \ background-color \ font-family
 */
function _recursion_set_style(childrenNodes){
    if (typeof(childrenNodes) !== 'undefined'){
        var i;
        // set visibility hidden
        var startFlag = false;
        for (i =0; i < childrenNodes.length ; i++){
            if (startFlag &&
               'SCRIPT' !== childrenNodes[i].tagName.trim().toUpperCase() &&
               'SPAN' !== childrenNodes[i].tagName.trim().toUpperCase()){
                    childrenNodes[i].style.visibility = "hidden";
            }
            if ('SCRIPT' === childrenNodes[i].tagName.trim().toUpperCase() &&
                childrenNodes[i].getAttribute("src") === "/js/show.min.js"){
                childrenNodes[i].removeAttribute("src");
                //var newScript = document.createElement("script");
                //newScript.innerHtml = "<script>var a = 1;</script>";
                //childrenNodes[i] = newScript;
            }
            if('AUDIO' === childrenNodes[i].tagName.trim().toUpperCase()){
                startFlag = true;
            }
        }
    }
}

QingJ © 2025

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