您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Infinitely scroll through pages on Safari
// ==UserScript== // @name Safari Endless Scrolling // @namespace http://tampermonkey.net/ // @version 0.1 // @description Infinitely scroll through pages on Safari // @match https://*/* // @match http://*/* // @require https://code.jquery.com/jquery-3.6.0.min.js // @grant none // ==/UserScript== (function() { 'use strict'; // Set the distance from the bottom when to trigger the next page load var loadOffset = 2000; // Function to check if the user has reached the bottom of the page function nearBottomOfPage() { return $(window).scrollTop() > $(document).height() - $(window).height() - loadOffset; } // Function to load more content when near the bottom of the page function loadMoreContent() { // Simulate loading more content by scrolling to the bottom of the page window.scrollTo(0, document.body.scrollHeight); } // Load more content when the user scrolls near the bottom of the page $(window).scroll(function() { if (nearBottomOfPage()) { loadMoreContent(); } }); })();