ACT.Google.MO.Auto-Seemore

Mobile google search See more automatically.

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               ACT.Google.MO.Auto-Seemore
// @name:zh-CN         ACT.谷歌.MO.自动查看更多
// @description        Mobile google search See more automatically.
// @description:zh-CN  移动网站谷歌搜索自动查看更多。
// @author             ACTCD
// @version            20220722.1
// @license            GPL-3.0-or-later
// @namespace          ACTCD/Userscripts
// @supportURL         https://github.com/ACTCD/Userscripts#contact
// @homepageURL        https://github.com/ACTCD/Userscripts
// @match              https://www.google.com/search*
// @grant              none
// @inject-into        content
// @run-at             document-start
// ==/UserScript==

(function () {
	"use strict";

	window.addEventListener("scroll", () => {
		if (
			window.pageYOffset + window.innerHeight * 2 <
			document.body.clientHeight
		)
			return;
		let button = document.querySelector(
			"a[aria-label='See more'],a[aria-label='查看更多']",
		);
		if (button?.style.display !== "none") button?.click();
	});
})();