thecyberd3m0n / Generic Focus Listeners Override

Published:

Version: 0.0.1+9d5743b

Summary: Disables focus-related events for any websites. Makes minimizing, hiding

Copyright: 2024, thecyberd3m0n (https://openuserjs.org/users/thecyberd3m0n)

License: MIT

TamperMonkey Script: Block and Remove Event Listeners

This TamperMonkey script dynamically blocks and removes specific event listeners (e.g., blur, visibilitychange, focusout) added by websites to prevent unwanted behavior such as focus loss or visibility changes. It intercepts event listener registrations and removes blocked listeners immediately.

Features

  • Blocks specific event listeners such as blur, visibilitychange, and focusout.
  • Tracks and removes already registered event listeners on window, document, or other elements.
  • Provides console logging to inform you when an event listener is blocked or removed.

Installation

  1. Install TamperMonkey:

  2. Create a New Script:

    • Open the TamperMonkey dashboard by clicking the TamperMonkey icon in the browser toolbar.
    • Click on the Create a new script button.
  3. Paste the Script:

    • Delete any default code that appears and paste the script below into the editor.
  4. Save the Script:

    • Click FileSave or use the keyboard shortcut Ctrl+S to save the script.

Rating: 0