Home : Support

How to stop JavaScript on specific websites in Mac Safari

1. If StopTheScript is not yet enabled, see how to enable StopTheScript.

2. If you want to stop all JavaScript on a specific website, open the site in Safari, and click the StopTheScript extension icon in the Safari toolbar.

The extension StopTheScript would like to access en.wikipedia.org.

3. Allow StopTheScript to access the website for one day or always, according to your preference. This allows StopTheScript to stop JavaScript on the site. (In other words, you allow StopTheScript in order to disallow JavaScript.)

You don't want to select "Always Allow on Every Website", because that would disable JavaScript entirely in Safari.

4. StopTheScript is now allowed on the website. Right after you allow it on a website, you may need to reload the Safari tab for JavaScript blocking to take effect immediately on the page that's already open. But on any new page load, JavaScript blocking will be automatic.

Whenever StopTheScript is allowed on a website, its icon will show a tinted highlight. The tint is your selected accent color in Appearance System Settings, which by default is blue.

Blue StopTheScript icon in the Safari toolbar

Undo:
If you stopped JavaScript on a website, but you want to enable JavaScript on that site again, you can revoke StopTheScript's access to the site. Open the Websites pane in the Safari Settings window and select StopTheScript.

Safari Settings, Websites, StopTheScript, Configured Websites, en.wikipedia.org, Allow

Select the website in the list, and click the Remove button.

Safari Settings, Websites, StopTheScript, Configured Websites, empty list

Advanced Tip:
Is it possible for StopTheScript to stop all JavaScript on all websites by default, while allowing JavaScript on a few selected websites? Yes, but it's a little tricky. You first want to allow StopTheScript on all websites. Then when you visit a website where you want to allow JavaScript, open the Websites tab in the Safari Settings window and deny StopTheScript on that website.

Safari Settings, Websites, StopTheScript, Configured Websites, example.org, Deny, For other websites: Allow

Remember that allowing StopTheScript means denying JavaScript, and denying StopTheScript means allowing JavaScript.

Noscript:
By default, StopTheScript allows HTML <noscript> elements to display. (Try this test page for a demo.) However, if you want to prevent <noscript> elements from displaying, there's a setting in the StopTheScript extension popup that allows you to hide <noscript>, by default and by website. After changing the setting, you need to reload the webpage in Safari to make the new setting take effect immediately.

StopTheScript Safari extension popup

Home : Support