reddit-auto-click

auto clicks reddit links to move past the comments page

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==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.9
// ==/UserScript==
var ignore = [
	"www.theskepticsguide.org",
	"www.youtube.com",
	"discord.gg",
	"radar.cloudflare.com",
	"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;
}