ACT.谷歌.MO.自动查看更多

移动网站谷歌搜索自动查看更多。

  1. // ==UserScript==
  2. // @name ACT.Google.MO.Auto-Seemore
  3. // @name:zh-CN ACT.谷歌.MO.自动查看更多
  4. // @description Mobile google search See more automatically.
  5. // @description:zh-CN 移动网站谷歌搜索自动查看更多。
  6. // @author ACTCD
  7. // @version 20220722.1
  8. // @license GPL-3.0-or-later
  9. // @namespace ACTCD/Userscripts
  10. // @supportURL https://github.com/ACTCD/Userscripts#contact
  11. // @homepageURL https://github.com/ACTCD/Userscripts
  12. // @match https://www.google.com/search*
  13. // @grant none
  14. // @inject-into content
  15. // @run-at document-start
  16. // ==/UserScript==
  17.  
  18. (function () {
  19. "use strict";
  20.  
  21. window.addEventListener("scroll", () => {
  22. if (
  23. window.pageYOffset + window.innerHeight * 2 <
  24. document.body.clientHeight
  25. )
  26. return;
  27. let button = document.querySelector(
  28. "a[aria-label='See more'],a[aria-label='查看更多']",
  29. );
  30. if (button?.style.display !== "none") button?.click();
  31. });
  32. })();