back to index

TDX Window Blocker

Custom Safari Script for TDX Popups

repo: https://github.com/EricSpencer00/WindowBlockerForTDX-MacOS


TDX opens a new window whenever a ticket, user or similar record is clicked. This script, paired with Stay for Safari, blocks the new window and renders the content inside the current window in a modal container.

It overrides openWin so that content is displayed in a modal overlay, and it removes openWinHref onclick attributes dynamically. It runs in Safari through the Stay for Safari extension.

How to install script.js on Safari using Stay for Safari

Prerequisites

1. Install Stay for Safari

  1. Open the Stay for Safari page on the App Store.
  2. Click "Get" to download and install the extension.
  3. Once it is installed, open Safari and go to Preferences > Extensions.
  4. Enable the Stay for Safari extension.

2. Open Stay for Safari

  1. Click the Stay for Safari icon in the Safari toolbar.
  2. Select "Manage Scripts" from the dropdown menu.

3. Add script.js

  1. In the Stay for Safari interface, click the "+" button to add a new script.
  2. Enter a name for the script.
  3. Copy the contents of the script.js file found here and paste it into the script editor.
  4. Specify the TDX URL in the 6th line of the script.

4. Save and activate the script

  1. Click "Save".
  2. Check the toggle switch next to the script name to confirm the script is enabled.

5. Verify the script

  1. Navigate to a page where the script should run.
  2. Open the browser console (Option + Command + C) to check that the script is executing.

GitHub Repo