隐藏Bilibili热搜内的推荐搜索

隐藏Bilibili侧边栏话题,自己编着玩的

// ==UserScript==
// @name         隐藏Bilibili热搜内的推荐搜索
// @namespace    http://tampermonkey.net/
// @version      0.0.1
// @description  隐藏Bilibili侧边栏话题,自己编着玩的
// @author       Xw
// @match           *://*.bilibili.com/*
// @exclude         *://api.bilibili.com/*
// @exclude         *://api.*.bilibili.com/*
// @exclude         *://*.bilibili.com/api/*
// @exclude         *://member.bilibili.com/studio/bs-editor/*
// @exclude         *://t.bilibili.com/h5/dynamic/specification
// @exclude         *://bbq.bilibili.com/*
// @exclude         *://message.bilibili.com/pages/nav/header_sync
// @exclude         *://s1.hdslb.com/bfs/seed/jinkela/short/cols/iframe.html
// @exclude         *://open-live.bilibili.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=bilibili.com
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';
    const interval = setInterval(() => {
        if (mainFunc()) {
            clearInterval(interval);
            console.log('执行隐藏Bilibili热搜内的推荐搜索脚本完成');
        }
    }, 500);
})();

function mainFunc() {
    const inputElement = document.querySelector('.nav-search-input');
    if (inputElement) {
        inputElement.placeholder = '搜索';
        return true;
    }
    return false;
}