Always on focus

Prevents websites from knowing that you switched tabs or unfocused the window

作者
daijro
日安装量
4
总安装量
13,525
评分
8 1 1
版本
1.5.3
创建于
2021-07-20
更新于
2024-06-09
大小
2.5 KB
许可证
暂无
适用于
所有网站

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: