您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically scrolls down the page with a visible countdown timer.
当前为
// ==UserScript== // @name Auto Scroll with Countdown // @description Automatically scrolls down the page with a visible countdown timer. // @match *://*/* // @version 0.0.1.20250614104400 // @namespace https://gf.qytechs.cn/users/1435046 // ==/UserScript== (function() { 'use strict'; const scrollSpeed = 1; // pixels per frame const frameInterval = 16; // ms (approx 60fps) let scrollInterval; let totalScrollDistance; let estimatedTime; let remainingTime; let timerDiv; function createTimerDisplay() { timerDiv = document.createElement('div'); Object.assign(timerDiv.style, { position: 'fixed', top: '10px', right: '10px', backgroundColor: 'rgba(0, 0, 0, 0.75)', color: '#fff', padding: '6px 10px', borderRadius: '6px', fontFamily: 'monospace', fontSize: '14px', zIndex: '999999' }); document.body.appendChild(timerDiv); } function updateTimerDisplay(seconds) { const mins = Math.floor(seconds / 60); const secs = Math.floor(seconds % 60); timerDiv.textContent = `${String(mins).padStart(2, '0')}:${String(secs).padStart(2, '0')}`; } function startAutoScroll() { totalScrollDistance = document.documentElement.scrollHeight - window.innerHeight; const remainingDistance = totalScrollDistance - window.scrollY; estimatedTime = remainingDistance / scrollSpeed * (frameInterval / 1000); // in seconds remainingTime = estimatedTime; scrollInterval = setInterval(() => { const currentScroll = window.scrollY; const maxScroll = document.documentElement.scrollHeight - window.innerHeight; if (currentScroll >= maxScroll) { clearInterval(scrollInterval); updateTimerDisplay(0); return; } window.scrollBy(0, scrollSpeed); remainingTime -= frameInterval / 1000; updateTimerDisplay(remainingTime); }, frameInterval); } createTimerDisplay(); startAutoScroll(); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址