-
-
Save JenieX/9f306e81f970186bd9aa64a76b64b605 to your computer and use it in GitHub Desktop.
Redirect to Farside (Userscript)
This file contains hidden or 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.4 | |
// @description Redirects the configured websites to third-party privacy-respecting front ends. | |
// @author examosa | |
// @license AGPLv3-or-later | |
// @updateUrl 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/* | |
// @runAt 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.replace(target); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment