// ==UserScript== // @name InviReg - YouTube->Invidious // @author Albirew, heavily based on script by Tazeki // @namespace https://gist.github.com/Albirew/ // @description The smallest, possibly most useful YouTube-Invidious conversion script. RegEx based. Sends any /www.youtube.com/ sites to Invidious before page load. Does not affect /other.youtube.com/, (gaming.youtube.com, creatoracademy.youtube.com, etc.). // @include *youtube* // @version 1.1d // @icon https://invidious.fdn.fr/favicon.ico // @grant none // @run-at document-start // @downloadURL https://git.dess.ga/Albirew/GISTS/raw/branch/main/web/userscripts/InviReg.user.js // @updateURL https://git.dess.ga/Albirew/GISTS/raw/branch/main/web/userscripts/InviReg.user.js // ==/UserScript== var url = window.location.toString(); if (url.indexOf('www.youtube.com') !== - 1) { window.location = url.replace(/www.youtube.com/, 'invidious.fdn.fr'); } else if (url.indexOf('www.youtu.be') !== - 1) { window.location = url.replace(/www.youtu.be/, 'invidious.fdn.fr'); }