🚫 Bypass Fullscreen Detection 🚫

Tricks websites into thinking they are always in fullscreen mode

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         🚫 Bypass Fullscreen Detection 🚫
// @namespace    http://tampermonkey.net
// @version      1.0
// @description  Tricks websites into thinking they are always in fullscreen mode
// @author       Otjl12
// @match        *://*/*
// @grant        none
// @run-at       document-start
// @license      MIT
// @compatible   chrome
// @compatible   firefox
// @compatible   edge
// @compatible   brave
// @compatible   opera
// @compatible   safari
// ==/UserScript==

(function() {
    'use strict';

    // 1. Lie to the website about the current fullscreen element
    // Instead of returning null when minimized, it will pretend the page body is maximized
    Object.defineProperty(document, 'fullscreenElement', {
        get: () => document.body,
        configurable: true
    });

    Object.defineProperty(document, 'webkitFullscreenElement', {
        get: () => document.body,
        configurable: true
    });

    Object.defineProperty(document, "fullscreenEnabled", {
        get: () => true,
        configurable: true
    });

    // 2. Kill the events that tell the website "you just left fullscreen"
    const blockEvents = ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange', 'MSFullscreenChange'];

    blockEvents.forEach(eventType => {
        window.addEventListener(eventType, function(e) {
            e.stopImmediatePropagation();
        }, true);

        document.addEventListener(eventType, function(e) {
            e.stopImmediatePropagation();
        }, true);
    });

    console.log("Fullscreen spoofing active.");
})();