Last active
December 15, 2021 20:25
-
-
Save UCyborg/100935b7572423a56e28fb0e60596c92 to your computer and use it in GitHub Desktop.
This file contains 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 YouTube always-mobile | |
// @namespace https://github.com/UCyborg | |
// @description Always redirects desktop YouTube to mobile version | |
// @version 1.0.1 | |
// @author UCyborg | |
// @downloadURL https://gist.github.com/UCyborg/100935b7572423a56e28fb0e60596c92/raw/YouTube_always-mobile.user.js | |
// @include /https:\/\/www\.youtube\.com\/(?!embed\/.*$)/ | |
// @run-at document-start | |
// @grant none | |
// ==/UserScript== | |
'use strict'; | |
(function() { | |
let url = new URL(window.location); | |
url.host = 'm.youtube.com'; | |
url.searchParams.set('app', 'm'); | |
url.searchParams.set('persist_app', '1'); | |
window.location.replace(url); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment