您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
7/1/2025, 3:33:41 PM
// ==UserScript== // @name reddit.com: Disable endless scrolling // @namespace Violentmonkey Scripts // @author klaufir216 // @license MIT // @match https://www.reddit.com/* // @grant none // @version 1.1 // @description 7/1/2025, 3:33:41 PM // ==/UserScript== function getFeedElement(path) { return Array.from(document.querySelectorAll('faceplate-partial')).filter(e => e.getAttribute('src').startsWith(path))?.[0]; } function getPartialElem() { return getFeedElement('/svc/shreddit/community-more-posts/') // main page || getFeedElement('/svc/shreddit/feeds/home-feed') // home feed || getFeedElement('/svc/shreddit/feeds/popular-feed'); // popular feed } function getArticleCount() { return document.querySelectorAll('article').length + document.querySelectorAll('div.virtualized-placeholder').length; } setInterval(function() { var partialElem = getPartialElem(); if (partialElem) { var articleCount = getArticleCount(); console.log('---- [Disable reddit autoload] articleCount == ', articleCount); if (articleCount > 50) { console.log('---- [Disable reddit autoload] Remove autoload element'); partialElem?.remove(); } } }, 1000);