Greasy Fork

Greasy Fork is available in English.

清爽直播

去除直播页下方礼物面板

当前为 2018-10-20 提交的版本,查看 最新版本

// ==UserScript==
// @name         清爽直播
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  去除直播页下方礼物面板
// @author       greasyblade
// @match        *://live.bilibili.com/*
// @match        *://www.douyu.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // live.bilibili.com/*
    if (location.hostname === 'live.bilibili.com') {
        var auto = setInterval(function() {
            if (document.getElementsByClassName("gift-control-panel f-clear b-box p-relative")[0]) {
                document.getElementsByClassName("gift-control-panel f-clear b-box p-relative")[0].remove();
                clearInterval(auto);
            }
        }, 50);
    }

    // douyu.com/*
    if (location.hostname === 'www.douyu.com') {
        var auto = setInterval(function() {
            if (document.getElementById("js-stats-and-actions")) {
                document.getElementById("js-stats-and-actions").remove();
                clearInterval(auto);
            }
        }, 50);
    }
})();