YouTube redirect to mobile

Redirect YouTube desktop site to mobile site

Instalar o script?
Script sugerido do autor

Você também pode gostar de youtube profile picture hd.

Instalar o script
// ==UserScript==
// @name        YouTube redirect to mobile
// @namespace   YouTube redirect to mobile
// @match       https://www.youtube.com/*
// @run-at      document-start
// @grant       none
// @version     1.2
// @description Redirect YouTube desktop site to mobile site
// ==/UserScript==

(function() {
    'use strict';
    
    // Check if the current URL is the desktop version of YouTube
    if (window.location.hostname === 'www.youtube.com') {
        // Redirect to the mobile version
        window.location.href = 'https://m.youtube.com' + window.location.pathname + window.location.search;
    }
})();