您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Script to scroll automatically to the bottom of Reddit's saved page
当前为
// ==UserScript== // @name Reddit saved autoscroller // @match https://www.reddit.com/user/*/saved/ // @grant none // @version 1.0 // @author AdrianSkar // @description Script to scroll automatically to the bottom of Reddit's saved page // @namespace https://greasyfork.org/users/564765 // ==/UserScript== /*jshint esversion: 6 */ // Scroll fn function autoScroll(time) { let intervalA = window.setInterval(() => { if ((window.scrollY + window.screen.height) >= document.body.scrollHeight) { alert('done scrolling'); clearInterval(intervalA); return; } else window.scrollTo(0, document.body.scrollHeight); }, time); } // Create and display new button let lastButton = document.querySelector('#profile-nav-menu-tooltip'); let scrollButton = lastButton.cloneNode(); scrollButton.textContent = 'SCROLL TO BOTTOM'; lastButton.parentElement.appendChild(scrollButton); // Listen for click and perform autoScroll scrollButton.addEventListener('click', () => { let time = prompt("Speed in ms (you'l get an alert when done):"); autoScroll(time); });