YouTube Mobile Fullscreen Fix for Kiwi Browser

-

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

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