Skip to content

Instantly share code, notes, and snippets.

@awcator
Last active May 16, 2022 15:26
Show Gist options
  • Select an option

  • Save awcator/801a041990a2037ff367fabbe8e80a7a to your computer and use it in GitHub Desktop.

Select an option

Save awcator/801a041990a2037ff367fabbe8e80a7a to your computer and use it in GitHub Desktop.

Revisions

  1. awcator revised this gist Jul 10, 2021. No changes.
  2. awcator revised this gist May 7, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions My_BYPASS
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    // ==UserScript==
    // @name Match Every Site
    // @namespace https://codepen.io/
    // @namespace https://targetwebsite.com/
    // @version 1.1
    // @description Bypass fullscreen/tabswtich/invisbility screen
    // @author Dev
    @@ -14,7 +14,7 @@ document.visibilityState="visible";
    unsafeWindow.document.visibilityState="visible";
    delete window.document.referrer;
    window.document.__defineGetter__('referrer', function () {
    return "https://codepen.io/";
    return "https://targetwebsite.com/";
    });

    for (event_name of ["visibilitychange", "webkitvisibilitychange", "blur"]) {
  3. awcator created this gist Mar 11, 2021.
    30 changes: 30 additions & 0 deletions My_BYPASS
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    // ==UserScript==
    // @name Match Every Site
    // @namespace https://codepen.io/
    // @version 1.1
    // @description Bypass fullscreen/tabswtich/invisbility screen
    // @author Dev
    // @match *://*/*
    // @grant unsafeWindow
    // ==/UserScript==

    unsafeWindow.document.hasFocus = function () {return true;};
    Object.defineProperty(document, "hidden", { value : false});
    document.visibilityState="visible";
    unsafeWindow.document.visibilityState="visible";
    delete window.document.referrer;
    window.document.__defineGetter__('referrer', function () {
    return "https://codepen.io/";
    });

    for (event_name of ["visibilitychange", "webkitvisibilitychange", "blur"]) {
    window.addEventListener(event_name, function(event) {
    event.stopImmediatePropagation();
    }, true);
    }
    for (event_name of ["visibilitychange", "webkitvisibilitychange", "blur"]) {
    unsafeWindow.addEventListener(event_name, function(event) {
    event.stopImmediatePropagation();
    }, true);
    }
    alert("ASD");