Created
October 14, 2017 17:34
-
-
Save mathemandy/1d06133d2c10bde868b344084d6d9120 to your computer and use it in GitHub Desktop.
always on focus
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 Always on focus | |
// @namespace http://www.webmonkey.com | |
// @description Some pages check the document.hidden property and won't render content unless the page is in focus. This script will trick them to think they are in focus so you can preload them in a tab and visit them when they have finished loading. | |
// ==/UserScript== | |
Object.defineProperty(document, "hidden", { value : false}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do i use this?