Greasy Fork is available in English.

Always on focus

Prevent websites from knowing that you switched tabs

Per 20-07-2021. Zie de nieuwste versie.

Maker
daijro
Beoordelingen
0 0 0
Versie
1.1
Gemaakt op
20-07-2021
Bijgewerkt op
20-07-2021
Grootte
1,29 KB
Licentie
N.v.t.
Wordt toegepast op
Alle websites

Always on focus

Userscript to trick websites into thinking the tab is always on focus


Installation

  1. Download the Tampermonkey browser extension

  2. Click here to install the userscript

  3. Toggle the userscript on/off from the Tampermonkey dashboard


What it does

Always on focus is a lightweight userscript that prevents websites from knowing that you switched tabs or unfocused the window. This is a fork of this userscript that adds these:

  • Disables the Page Visibility API

  • Disables the window.onblur() event and and sets window.hasFocus() and window.onFocus() to always true (Ex.)

  • Removes the visibilitychange and blur event listeners (Ex.)

Example:

Here is an example website that changes color when the window isn't focused: