您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
每隔3秒自动翻页
// ==UserScript== // @name 定时页面滚动 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 每隔3秒自动翻页 // @author 你的名字 // @match https://linux.do/t/topic/** // @grant none // @run-at document-idle // @license MIT // ==/UserScript== (function () { 'use strict'; var y = window.scrollY; setInterval(function () { y += window.innerHeight; console.log(y); window.scrollTo(0, y); if ((window.innerHeight + window.scrollY) >= document.documentElement.scrollHeight) { // 执行当滚动到底部时的操作 console.log('已经滚动到页面的最底部了!'); var list = $('a.title.raw-link.raw-topic-link[href^="/t/topic/"]'); if(list.length === 0 ){ list = $('div.recent-topics div.not-found-topic a[href^="/t/topic/"]'); } var topic = $(list[Math.floor(Math.random() * list.length)]).attr('href'); if (!topic) { topic = '/t/topic/' + Math.floor(Math.random() * 5000); } console.log(topic); window.location.href = 'https://linux.do' + topic; } }, 3000); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址