// ==UserScript== // @name YouTube Redirect to Invidious // @namespace Backend // @include https://m.youtube.com/* // @include http://m.youtube.com/* // @include https://www.youtube.com/* // @include http://www.youtube.com/* // @version 1.2 // @run-at document-start // @author Denis // @grant none // @description yewtu.be, ytprivate.com, invidious.exonip.de, notyoutube.org, redirect.invidious.io // ==/UserScript== var a = 0; setInterval(function () { if (a === 0 && window.location.href.indexOf('watch?') > -1 && window.location.href.indexOf('list=WL') < 0) { a = '//yewtu.be/watch?' + window.parent.location.href.split('?')[1]; window.location.replace(a); } }, 10); |