A simple Cocoa-flavoured AppleScript implementation of a watchdog for resetting the browser to a single website when the screensaver stops.
To make this work with Firefox there are certain prerequisites:
- Disable "warn on closing multiple tabs" (Settings)
- Allow
window.close()
: Set propertydom.allow_scripts_to_close_windows
totrue
in about:config) - Install Greasemonkey script to block all "onbeforeunload" listeners websites might have in place: exitblock.user.js (via Block Exit Blockers User Script)
It is only this configuration which allows an outside script to close all browser windows without nagging.
If you are curious, the magic happens in AppDelegate.applescript.