Greasy Fork is available in English.

No Keywords

Get rid of fucking highlighted search keywords.

// ==UserScript==
// @name         No Keywords
// @name:zh-CN   移除搜索关键词
// @namespace    http://tampermonkey.net/
// @version      0.2.1
// @description  Get rid of fucking highlighted search keywords.
// @description:zh-CN 去你妈的傻逼高亮搜索关键词。
// @author       PRO
// @match        https://zhidao.baidu.com/question/*
// @match        https://www.bilibili.com/*
// @match        https://blog.csdn.net/*
// @icon         https://cors.cdn.bcebos.com/amis/namespaces/m-activity/iknow-duck/2022-12/1671625780490/%E6%90%9C%E7%B4%A2wap.png
// @grant        none
// @license      gpl-3.0
// ==/UserScript==

(function() {
    'use strict';
    function fuck(kw) { // `kw` is the element to be fixed
        let txt = kw.textContent;
        let tn = document.createTextNode(txt);
        kw.parentElement.replaceChild(tn, kw);
    }
    function purify() {
        document.querySelectorAll(sel_keyword).forEach(fuck);
        if (sel_icon) {
            let icons = document.querySelectorAll(sel_icon);
            icons.forEach(icon => icon.remove());
        }
    }
    let config = {
        "zhidao.baidu.com": {
            keyword: ".rich-content-container a[highlight='true']",
            icon: null,
            persistent: false
        },
        "www.bilibili.com": {
            keyword: "a.search-word",
            icon: "i.search-word",
            persistent: true
        },
        "blog.csdn.net": {
            keyword: "a.hl-1",
            icon: null,
            persistent: false
        }
    }
    if (!(window.location.hostname in config)) return;
    let cfg = config[window.location.hostname];
    let sel_keyword = cfg.keyword;
    let sel_icon = cfg.icon;
    if (cfg.persistent) {
        window.setInterval(purify, 1000);
    } else {
        purify();
    }
})();