您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
自动展开简单搜索的结果,避免需要多次点击“加载更多”按钮。
当前为
// ==UserScript== // @name 简单搜索自动展开 // @description 自动展开简单搜索的结果,避免需要多次点击“加载更多”按钮。 // @author ChatGPT // @version 3.0 // @match https://m.baidu.com/* // @match https://www.baidu.com/* // @run-at document-end // @grant none // @namespace http://greasyfork.icu/users/452911 // ==/UserScript== (function() { 'use strict'; if (navigator.userAgent.includes('SearchCraft')) { const infScroll = document.querySelector('span.se-infiniteload-more'); if (infScroll) { window.addEventListener('scroll', function() { var element = document.querySelector('span.se-infiniteload-more'); if (element) { var position = element.getBoundingClientRect(); if (position.top >= 0 && position.bottom <= window.innerHeight) { element.click(); } } }); } } })();