Google Search Term Suggestion Removal

removes the new stupid search suggestion terms

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Google Search Term Suggestion Removal
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  removes the new stupid search suggestion terms
// @author       an0nymooose
// @match        https://www.google.com/search?*
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';
    function onReady() {
        var plus = document.querySelectorAll("path[d='M11 19V13H5V11H11V5H13V11H19V13H13V19Z']");
        plus.forEach(function(element) {
            //remove 5th parent
            for(var e = element, p = [], i=0; e && e !== document; e = e.parentNode){
                if(i>5){break;}
                if(i==5){e.remove()} i++;
            }
        });
    }
    if (document.readyState !== "loading") {
        onReady();
    } else {
        document.addEventListener("DOMContentLoaded", onReady);
    }
})();