YouTube Mobile Fullscreen Fix for Kiwi Browser

-

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==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 });
})();