Opens “Tools” Menu by Default on Google

Opens the “Tools” menu on Google Search automatically when page loaded.

当前为 2023-02-18 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Opens “Tools” Menu by Default on Google
  3. // @name:zh-TW 預設開啟 Google 的「工具」選單
  4. // @description Opens the “Tools” menu on Google Search automatically when page loaded.
  5. // @description:zh-TW 在 Google 搜尋載入後自動打開「工具」選單。
  6. // @icon https://wsrv.nl/?url=https://www.google.com/images/branding/googleg/1x/googleg_standard_color_128dp.png
  7. // @author Jason Kwok
  8. // @namespace https://jasonhk.dev/
  9. // @version 1.0.0
  10. // @license MIT
  11. // @match https://www.google.com/search
  12. // @run-at document-end
  13. // @grant none
  14. // @supportURL https://gf.qytechs.cn/scripts/460247/feedback
  15. // ==/UserScript==
  16.  
  17. const toolsButton = document.querySelector("#hdtb-tls, [jsname=I4bIT], [jscontroller=LbcJwc]");
  18. if (toolsButton)
  19. {
  20. const interval = setInterval(() =>
  21. {
  22. if (toolsButton.getAttribute("aria-expanded") !== "true")
  23. {
  24. toolsButton.click();
  25. }
  26. else
  27. {
  28. clearInterval(interval);
  29. }
  30. }, 250);
  31. }

QingJ © 2025

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