預設開啟 Google 的「工具」選單

在 Google 搜尋載入後自動打開「工具」選單。

目前為 2023-02-18 提交的版本,檢視 最新版本

// ==UserScript==
// @name               Opens “Tools” Menu by Default on Google
// @name:zh-TW         預設開啟 Google 的「工具」選單
// @description        Opens the “Tools” menu on Google Search automatically when page loaded.
// @description:zh-TW  在 Google 搜尋載入後自動打開「工具」選單。
// @icon               https://wsrv.nl/?url=https://www.google.com/images/branding/googleg/1x/googleg_standard_color_128dp.png
// @author             Jason Kwok
// @namespace          https://jasonhk.dev/
// @version            1.0.0
// @license            MIT
// @match              https://www.google.com/search
// @run-at             document-end
// @grant              none
// @supportURL         https://gf.qytechs.cn/scripts/460247/feedback
// ==/UserScript==

const toolsButton = document.querySelector("#hdtb-tls, [jsname=I4bIT], [jscontroller=LbcJwc]");
if (toolsButton)
{
    const interval = setInterval(() =>
    {
        if (toolsButton.getAttribute("aria-expanded") !== "true")
        {
            toolsButton.click();
        }
        else
        {
            clearInterval(interval);
        }
    }, 250);
}

QingJ © 2025

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