屏蔽bilibili动态的话题

屏蔽bilibili动态的话题,让你不被无关的信息干扰

// ==UserScript==
// @name         屏蔽bilibili动态的话题
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  屏蔽bilibili动态的话题,让你不被无关的信息干扰
// @author       Chatinfer
// @license      MIT
// @match        https://t.bilibili.com
// @icon         https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/images/logo-small.png
// @icon64       https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/images/logo.png
// @grant        none
// ==/UserScript==

(async function() {
    'use strict';

    //document.body.insertAdjacentHTML('afterbegin', "<div'>Hello World !</div>")

    //console.warn("hello world!")

    var timer = null
    var times = 0

    function remove_topics() {
        times = times + 1

        console.warn("remove_topics")

        let k = document.body.getElementsByClassName('relevant-topic')

        if (k.length == 0) {

            if (timer != null && times >= 100) {
                clearInterval(timer)
            }
            return
        }

        for(var i = 0; i < k.length; i++) {

            let el = k[i]

            //console.warn("removing topic")
            //console.warn(el)

            el.remove()
        }

        //console.warn(k.length)
    }

    timer = setInterval(remove_topics, 20)

})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址