Add Invidious Redirector script

This commit is contained in:
The Magician 2024-03-27 13:35:36 +00:00
parent 3db0a533ae
commit cdceafb4ee
1 changed files with 13 additions and 0 deletions

13
indivious_redirector.js Normal file
View File

@ -0,0 +1,13 @@
// ==UserScript==
// @name Invidious Redirector
// @description Automatically redirects to an Invidious instance when loading a Youtube page.
// @version 1
// @grant none
// @include https://www.youtube.com/*
// ==/UserScript==
const INVIDIOUS_INSTANCE = "yewtu.be"
let youtubeUrl = window.location.href;
let invidiousUrl = youtubeUrl.replace("www.youtube.com", INVIDIOUS_INSTANCE);
window.location.href = invidiousUrl;