feiszw_remove_advs

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

As of 08.10.2022. See ბოლო ვერსია.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         feiszw_remove_advs
// @namespace    http://netoday.cn
// @version      0.1.8
// @description  Remove divs of advertisements at https://m.feiszw.com
// @author       crazy_pig
// @match        https://m.feiszw.com/chapter-*
// @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);

        //setInterval(function(){
        //    var test = $('#crumb').innerText;
        //}, 3000);
    }
})();

function _change_style(){
    document.body.style = "font-family: \"Microsoft YaHei\"; background-color: #016974; padding-bottom: 130px;";
    document.getElementById("crumb").css({"background-color":"rgb(34 34 21)","color":"#E4DD40"});
    document.getElementById("header").css({"background-color":"#181C1F","color":"#EAF2F7"});
    document.getElementById("tools").css({"background-color":"#181C1F","color":"#EAF2F7"});
    document.getElementById("maintool").css({"background-color":"#181C1F","color":"#EAF2F7"});
    document.getElementById("moretool").css({"background-color":"#181C1F","color":"#EAF2F7"});
    document.getElementById("nr1").css("color","#E4DD40");
    document.getElementById("nr_title").css("color","#FFFFFF");
    document.getElementById("nr_botton").remove();
}

/**
 * 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");
            }
            if('AUDIO' === childrenNodes[i].tagName.trim().toUpperCase()){
                startFlag = true;
            }
            if(childrenNodes[i].innerText.indexOf("中文域名一键直达") >= 0){
                childrenNodes[i].innerHTML = "<a href=\"https://m.feiszw.com/\" style=\"font-weight:bold; color: #fff;text-align:center;margin-bottom:24px;font-size:.8rem\">飞速中文网移动版首页</a>";
            }
        }
    }
}