Greasy Fork is available in English.

Always on focus

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

질문, 리뷰하거나, 이 스크립트를 신고하세요.
개발자
daijro
일일 설치수
9
총 설치수
12,520
평점
6 1 1
버전
1.5.3
생성
2021-07-20
갱신
2024-06-09
라이선스
없음
동작 사이트
모든 사이트

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: