YouTube Mobile Fullscreen Fix for Kiwi Browser

-

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name:ko           키위브라우저 유튜브 풀스크린 잘림 개선
// @name              YouTube Mobile Fullscreen Fix for Kiwi Browser

// @description:ko    -
// @description	      -

// @namespace         https://ndaesik.tistory.com/
// @version           1.0
// @author            ndaesik
// @icon              https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://www.youtube.com
// @match             *://*.youtube.com/*
// ==/UserScript==

(function() {
    const FIREFOX_UA = 'Mozilla/5.0 (Windows Phone 10.0; Android 8.0.0; Microsoft; Lumia 950XL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.75 Mobile Safari/537.36 Edge/15.15063';
    const setUserAgent = () => {
        if (window.location.hostname.includes('youtube.com')) {
            Object.defineProperty(navigator, 'userAgent', { get: () => FIREFOX_UA });
            Object.defineProperty(navigator, 'platform', { get: () => 'Windows Phone' });
        }
    };
    setUserAgent();
    new MutationObserver(setUserAgent).observe(document.documentElement, { childList: true, subtree: true });
})();