Skip to content

Instantly share code, notes, and snippets.

@mathemandy
Created October 14, 2017 17:34
Show Gist options
  • Save mathemandy/1d06133d2c10bde868b344084d6d9120 to your computer and use it in GitHub Desktop.
Save mathemandy/1d06133d2c10bde868b344084d6d9120 to your computer and use it in GitHub Desktop.
always on focus
// ==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});
@suwn
Copy link

suwn commented Apr 13, 2021

How do i use this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment