Last active
June 12, 2024 18:21
-
-
Save Tazeki/4474bc972710872c429e660a6b08681d to your computer and use it in GitHub Desktop.
YouTube / HookTube RegEx based URL conversion.
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 URL Conversion | YouTube - HookTube | |
// @namespace Tazeki | |
// @description The smallest, possibly most useful YouTube-HookTube conversion script. RegEx based. Report bugs to [email protected]. Sends any /www.youtube.com/ sites to HookTube before page load. Does not affect /other.youtube.com/, (gaming.youtube.com, creatoracademy.youtube.com, etc.). | |
// @include *youtube* | |
// @version 1 | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== | |
var url = window.location.toString(); | |
if (url.indexOf('www.youtube.com') !== - 1) { | |
window.location = url.replace(/youtube.com/, 'hooktube.com'); | |
} else if (url.indexOf('www.youtu.be') !== - 1) { | |
window.location = url.replace(/youtu.be/, 'hooktube.com'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not at all, @Lew-Rockwell-Fan. Even someone like me, who only had one single script installed was able to do it just fine.
And that's it. It's extremely easy.