Greasy Fork is available in English.

斗鱼广告活动屏蔽

屏蔽部分斗鱼直播间广告

Від 16.08.2018. Дивіться остання версія.

// ==UserScript==
// @name         斗鱼广告活动屏蔽
// @namespace    http://tampermonkey.net/
// @version      0.0.5
// @description  屏蔽部分斗鱼直播间广告
// @author       aiya
// @match        *://www.douyu.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var time = 0;
    

    var removeAD = function(){
        var ads = new Array(
            ".room-ad-video-down",
            ".valentine1807",
            ".adsRoot_7c5z4",
            ".chat-ad"
        );
    
        for (var i = 0;i<ads.length; i++){
            $(ads[i]).css("display", "none");
        }
    }

    removeAD();

    var timer = window.setTimeout(function() {
        removeAD();
        time++;
        if(time >= 15 && timer) {
            window.clearTimeout(timer);
            timer = null;
        }
    }, 3000);
})();