Could a demon be started at boot which if it detects the browser starting up then runs the code you suggest.
The other approach I was thinking of was reading the browser's cookies to trigger scripts. The screen brightness is one other thing I would like to control via javascript in the browser also.
|