Greasy Fork is available in English.

妮可,嗨哆咪,美剧社,樱花...广告过滤

喜欢看动漫但在手机端访问网页时一堆广告,所以这里屏蔽了动态加载的广告脚本,有些没用的轮播也去掉了

La data de 21-03-2020. Vezi ultima versiune.

// ==UserScript==
// @name         妮可,嗨哆咪,美剧社,樱花...广告过滤
// @namespace    https://www.yqsphp.com
// @version      1.0.32
// @description  喜欢看动漫但在手机端访问网页时一堆广告,所以这里屏蔽了动态加载的广告脚本,有些没用的轮播也去掉了
// @author       YQS
// @match        *://www.nicotv.me/*
// @match        *://www.nicotv.club/*
// @match        *://www.haiduomi.cc/*
// @match        *://m.meijushe.cc/*
// @match        *://www.tv432.com/*
// @match        *://m.yhdm.tv/*
// @require      http://libs.baidu.com/jquery/2.0.0/jquery.min.js
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var host = window.location.host;
    document.onreadystatechange = function(){
        if(document.readyState == "complete"){
            if("www.nicotv.me" == host || "www.nicotv.club" == host){
                $(".navbar").css("margin-top",0);
                $(".slide").remove();
                $(".ff-clearfix").remove();
                $(".ff-ads").remove();
                $(".ff-img").each(function(){
                    var img = $(this).attr("data-original");
                    $(this).attr("src",img);
                });
            }else if("m.yhdm.tv" == host){
                $(".swipe").remove();
            }
        }
    }
    var createElement = document.createElement;
    document.createElement = function (tag) {
        switch (tag) {
            case 'div':
            case 'style':
            case 'script':
                console.log('动态脚本已禁用');
                break;
            default:
                return createElement.apply(this, arguments);
        }
    }
})();