trigger, which may include a
url-filter and a
resource-type, such as
action, such as
Safari content blockers can only block the first type of script. StopTheScript blocks both.
If you install StopTheScript, you may find it strange that the extension has no settings. This is a technical limitation. Why? When a Safari extension is loaded into a web page, the extension's settings are not available immediately; any settings must be fetched from storage, an async operation. The problem is that the
<head> of an HTML document may contain
Will StopTheScript be coming to Safari on the Mac too? I hope so, in the future, but right now it can't, unfortunately. The irony is that StopTheScript was written for the Mac. The extension been complete for over a year, but I couldn't ship it for the Mac, and I still can't. I've just been sitting on it, waiting for the opportunity, which presented itself with iOS 15. Technically I could ship the extension on the Mac, but it wouldn't work right. It wouldn't do what I promised. The problem is that
"run_at":"document_start" doesn't work right in Safari on macOS, a bug that I blogged about over a year ago. At the time, I couldn't say why exactly I needed
document_start, but now I can: for StopTheScript! Strangely, this bug does not affect Safari on iOS, which is why I was able to release the extension on iOS.
There is a Safari extension bug that affects both macOS and iOS: Safari's default preference "Preload Top Hit" breaks
"run_at":"document_start". I also blogged about this bug before, earlier this year. Fortunately, there's a workaround for this bug: just change Safari's preference! The installation instructions for StopTheScript strongly recommend that you disable Preload Top Hit (as do the installation instructions for StopTheMadness). Even if you don't install my Safari extensions, you should still disable Preload Top Hit, because, frankly, it sucks. Preload Top Hit is a nightmare not only for Safari extensions but also for your own privacy.