Skip to content

Prevent websites from detecting tab switches or window unfocus πŸ›‘, while ensuring full website functionality πŸ’». Simulates constant visibility πŸ‘€ and focus πŸ”’ to bypass restrictions without breaking the user experience πŸ”§.

License

Notifications You must be signed in to change notification settings

Anghkooey/focus-mode-bypass

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

33 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ•΅οΈβ€β™‚οΈ Focus Mode Bypass

This script prevents websites from detecting tab switches or window unfocus without breaking website functionality. It emulates constant visibility and focus state, ensuring websites believe you're always active on the tab.


✨ Features

  • Tab Focus Emulation:
    Prevents websites from detecting when you switch tabs or unfocus the window.

  • Event Blocking:
    Blocks events related to visibility and focus such as visibilitychange, blur, and focus.

  • Full Visibility Simulation:
    Overrides document.hidden, document.visibilityState, and document.hasFocus to always return visible and focused states.

  • Safe Functionality Preservation:
    The script ensures website functionality remains intact while performing the spoofing.


πŸš€ Installation Guide

πŸ“Œ Prerequisites

  1. Install a userscript manager:

  2. Ensure you're using a supported browser:

    • Google Chrome
    • Mozilla Firefox

πŸ“₯ Installation Steps

1. Download the Script

Click here to install the userscript.

2. Add the Script to Tampermonkey

  • Open Tampermonkey dashboard.
  • Click on "Create a new script".
  • Paste the script code into the editor.
  • Save the script.

3. Activate the Script

  • Navigate to the website where you want the spoofing functionality.
  • Ensure the script is enabled in Tampermonkey.

🎯 How It Works

  1. Overrides document.hidden, document.visibilityState, and document.hasFocus to make the tab appear always focused.
  2. Blocks visibilitychange, blur, focus, and related events to prevent detection of tab switching.
  3. Ensures the site remains functional by blocking only relevant events without interfering with the core user experience.

⚠️ Disclaimer

This script is provided for educational purposes only.

  • Ensure you comply with the terms of service for the websites where you use it.
  • The author is not responsible for misuse or any consequences resulting from the script.

πŸ› οΈ Contributing

We welcome contributions!
Feel free to open an issue or submit a pull request for improvements or new features.


πŸ“œ License

This project is licensed under the GNU General Public License v3.0.
See the LICENSE file for details.

You can learn more about the GNU General Public License v3.0 here.


About

Prevent websites from detecting tab switches or window unfocus πŸ›‘, while ensuring full website functionality πŸ’». Simulates constant visibility πŸ‘€ and focus πŸ”’ to bypass restrictions without breaking the user experience πŸ”§.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%