Last active
February 5, 2025 19:14
-
-
Save examosa/50eb28bc16a006b62b3f43893ab457e7 to your computer and use it in GitHub Desktop.
Redirect to Farside (Userscript)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Redirect to Farside | |
// @version 1.1 | |
// @description Redirects the configured websites to third-party privacy-respecting front ends. | |
// @author examosa | |
// @license AGPLv3-or-later | |
// @update-url https://gist.github.com/examosa/50eb28bc16a006b62b3f43893ab457e7/raw/redirect-to-farside.js | |
// @match https://www.fandom.com/* | |
// @match https://medium.com/* | |
// @match https://stackoverflow.com/* | |
// @match https://www.reddit.com/* | |
// @match https://www.youtube.com/* | |
// @match https://www.quora.com/* | |
// @match https://www.geeksforgeeks.org/* | |
// @run-at document-start | |
// ==/UserScript== | |
const replacements = Object.entries({ | |
'www.geeksforgeeks.org': 'ducksforducks.private.coffee', | |
}); | |
const replacement = replacements.find(([hostname]) => hostname === location.hostname); | |
const target = replacement | |
? location.href.replace(...replacement) | |
: `https://farside.link/${location.href}`; | |
location.assign(target); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment