TestGorilla Full Screen Exit Bypass

Prevents TestGorilla from forcing users out of fullscreen mode by overriding exitFullscreen(), spoofing fullscreenElement, and blocking fullscreenchange event listeners. Useful for uninterrupted fullscreen experience during assessments.

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

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

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         TestGorilla Full Screen Exit Bypass
// @namespace    https://greatest.deepsurf.us/en/users/1461725-scriptninja
// @version      1.0.6
// @description  Prevents TestGorilla from forcing users out of fullscreen mode by overriding exitFullscreen(), spoofing fullscreenElement, and blocking fullscreenchange event listeners. Useful for uninterrupted fullscreen experience during assessments.
// @author       ScriptNinja
// @license      MIT
// @match        https://*.testgorilla.com/*
// @icon         https://www.google.com/s2/favicons?domain=testgorilla.com
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';

    // Override exitFullscreen to do nothing
    if (document.exitFullscreen) {
        document.exitFullscreen = function() {
            console.log("Blocked exitFullscreen");
            return Promise.resolve(); // Fake success
        };
    }

    // Block fullscreenchange events
    const originalAddEventListener = EventTarget.prototype.addEventListener;
    EventTarget.prototype.addEventListener = function(type, listener, options) {
        if (type === 'fullscreenchange') {
            console.log("Blocked fullscreenchange listener");
            return; // Do not add the event listener
        }
        originalAddEventListener.call(this, type, listener, options);
    };

    // Spoof fullscreen state
    Object.defineProperty(document, 'fullscreenElement', {
        get: () => document.documentElement, // Always return the root element as "fullscreen"
        configurable: true
    });
})();