reddit-auto-click

auto clicks reddit links to move past the comments page

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==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;
}