screenshot

JavaScript Blacklist

JavaScript Blacklist is a simple extension for Safari 5 which blacklists scripts from a configurable list of domains. If a common "utility" script used by sites that you visit is annoying you, this will let you opt out quickly and easily.

Here are some examples of common annoying scripts. JavaScript Blacklist comes pre-configured to block these by default.

Here are a few more that are a bit borderline. JavaScript Blacklist does not block these by default, but you can easily add them in the preferences.

Download

Interested? Download it now!

Source Code and License

This Safari extension is hereby placed in the public domain. No license or attribution is required to use it, and you may freely create and use derived works as you wish. There are two source files which may be of interest:

Following the spirit of how I'm sure Safari extensions were meant to work, the bulk of the code is in global.html. Why there? It's because that file is only loaded and compiled once, whereas the injected script is loaded dozens of times on a typical site.

Among other things, the source code demonstrates the proper way to use addEventListener to dynamically update the preferences. And it shows a decent way to use the extension's global HTML file as an object cache.

What's New

Acknowledgments