您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
auto clicks reddit links to move past the comments page
- // ==UserScript==
- // @name reddit-auto-click
- // @description auto clicks reddit links to move past the comments page
- // @namespace ziffusion.com
- // @include http*://*.reddit.com/r/*/comments/*
- // @version 10.8
- // ==/UserScript==
- var ignore = [
- "www.theskepticsguide.org",
- "www.youtube.com",
- "discord.gg",
- "www.rebusle.com"
- ];
- function isIgnored(url) {
- console.log('reddit-auto-click: check:', url.hostname);
- for (const ign of ignore) {
- if (ign == url.hostname) return true;
- }
- return false;
- }
- var results = document.evaluate('//shreddit-post//a', document, null, XPathResult.ANY_TYPE, null);
- var node;
- while (node = results.iterateNext()) {
- var url = new URL(node.href);
- if (isIgnored(url)) continue;
- if (url.hostname.toLowerCase().indexOf("reddit") >= 0) continue;
- console.log('reddit-auto-click: click:', url);
- window.open(url.href);
- break;
- }