Created
November 2, 2020 04:36
-
-
Save kookxiang/ca92e7d509b331697f97770cf7051ac1 to your computer and use it in GitHub Desktop.
Disable Page Visibility API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Disable Page Visibility API | |
// @namespace https://www.kookxiang.com/ | |
// @version 0.1 | |
// @description Disable Page Visibility API | |
// @author kookxiang | |
// @match https://*/* | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== | |
document.addEventListener('visibilitychange', e => e.stopImmediatePropagation(), true) | |
Object.defineProperty(document, 'visibilityState', { get: () => "visible" }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment