Alternate domain link converter userscript

  • 🔧 At about Midnight EST I am going to completely fuck up the site trying to fix something.

crunk connoisseur

kiwifarms.net
Joined
Dec 25, 2020
This userscript automatically converts links you click on with any mouse button to the domain you're currently using. This way, you can use any link seamlessly (like using .onion links for when we're back in the clearnet, or converting clearnet links to Tor if you're currently on it).
To use it, you must have some kind of userscript manager addon installed. You can get them from addons.mozilla.org since Tor Browser is based on Firefox. I personally use Violentmonkey.

Install it by copy pasting the code into a new script (remember to replace automatically generated boilerplate).

JavaScript:
// ==UserScript==
// @name        kiwifarms site links
// @namespace   Violentmonkey Scripts
// @match       https://kiwifarmsaaf4t2h7gc3dfc5ojhmqruw2nit3uejrpiagrxeuxiyxcyd.onion/*
// @match       https://kiwifarms.net/*
// @match       https://kiwifarms.ru/*
// @match       https://kiwifarms.is/*
// @match       https://kiwifarms.st/*
// @match       https://kiwifarms.tw/*
// @match       https://kiwifarms.hk/*
// @match       https://kiwifarms.pl/*
// @match       https://sneed.today/*
// @grant       none
// @version     1.1
// @author      -
// @description 5/14/2023, 8:47:23 AM
// ==/UserScript==

const url = new URL(document.URL).origin;

const repl = lnk => lnk.replace(/^(https?:\/\/)?((www.)?kiwifarms\.(net|ru|is|st|tw|hk|pl)|kiwifarmsaaf4t2h7gc3dfc5ojhmqruw2nit3uejrpiagrxeuxiyxcyd\.onion|sneed.today)/, url);

document.addEventListener('mousedown', e => {
  let t = e.target;
  if (t.tagName == 'A' && t.href) t.href = repl(t.href);
});

I've tried to link every single domain but it's possible I missed some. Let me know if there's a problem.

Links for testing:

EDIT: Script updated to 1.1 on 03.07.2023 to account for new clearnet domain.
 
Last edited:
Back