Greasy Fork

Greasy Fork is available in English.

删除斗鱼广告自用

删除斗鱼广告

// ==UserScript==
// @name         删除斗鱼广告自用
// @namespace    https://github.com/machenme/
// @version      0.2
// @description  删除斗鱼广告
// @author       zsjng
// @license      MIT
// @match			*://*.douyu.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=douyu.com
// @grant        none
// ==/UserScript==


(function() {
    'use strict';
    // 等待10秒后执行删除广告的函数
    setTimeout(function() {
        var removalbes = ["js-room-activity", "js-bottom"];
        for (var i = 0; i < removalbes.length; i++) {
            var element = document.getElementById(removalbes[i]);
            if (element) {
                element.parentNode.removeChild(element);
            }
        }
    }, 10000); // 10000毫秒 = 10秒
})();