Initial Commit
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// ==UserScript==
|
||||
// @name Reddit to Old Reddit redirector
|
||||
// @namespace reddit_to_oldreddit_redirector
|
||||
// @description Redirect Reddit links to Old Reddit
|
||||
// @include https://www.reddit.com*
|
||||
// @version 1.0
|
||||
// @grant none
|
||||
// ==/UserScript==
|
||||
|
||||
// alert("Redirecting");
|
||||
window.location = window.location.href.replace( "www.reddit.com", "old.reddit.com" );
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
// ==UserScript==
|
||||
// @name Youtube to Invidious redirector
|
||||
// @namespace youtube_to_invidious_redirector
|
||||
// @description Redirect Youtube links to Invidious
|
||||
// @include https://www.youtube.com/
|
||||
// @include https://www.google.com/sorry/index*
|
||||
// @include https://invidious.13ad.de/channel/*
|
||||
// @version 1.0
|
||||
// @grant none
|
||||
// ==/UserScript==
|
||||
|
||||
// Redirect from google error page
|
||||
if (window.location.host === "www.google.com") {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
let cont = urlParams.get('continue');
|
||||
|
||||
cont = decodeURI(cont);
|
||||
cont = cont.replace( "www.youtube.com", getInstance() );
|
||||
|
||||
window.location = cont;
|
||||
|
||||
// Redirect youtube
|
||||
} else if (window.location.host === "www.youtube.com") {
|
||||
// window.location = window.location.href.replace( "www.youtube.com", getInstance() );
|
||||
|
||||
// Fix instance issues
|
||||
} else {
|
||||
window.location = window.location.href.replace( "invidious.13ad.de/channel", "invidious.snopyta.org/channel" );
|
||||
}
|
||||
|
||||
|
||||
function getInstance() {
|
||||
const instances = [
|
||||
"invidious.snopyta.org",
|
||||
"yewtu.be",
|
||||
"invidious.13ad.de"
|
||||
];
|
||||
// return instances[0];
|
||||
return instances[Math.floor(Math.random() * instances.length)]
|
||||
}
|
||||
Reference in New Issue
Block a user