Remove Baidu Suggestion

Remove Baidu's shit

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Remove Baidu Suggestion
// @name:zh-CN   去除百度建议
// @author       Zero
// @match        *://www.baidu.com/*
// @grant        none
// @run-at       document-start
// @description  Remove Baidu's shit
// @description:zh-CN 去除百度拉的屎
// @version      0.0.1
// @license      GNU GPLv3
// @namespace    rbs
// ==/UserScript==

(function() {
    const observer = new MutationObserver(() => {
        document.querySelectorAll('.bdsug-ai-guide').forEach(el => {
            el.closest('li')?.remove();
        });
    });
    observer.observe(document.body, { childList: true, subtree: true });

    const searchbar = document.getElementsByClassName('s_ipt');
    for(var a = 0; a < searchbar.length; a++){
        searchbar[a].setAttribute('placeholder', '');
    }
})();