singpolyma/singpolyma — pull request #2 by arandomuser (2012-11-03 22:42:01+00:00)
Title: Add context-senitivity to userscript.sh

Adds an argument that can be passed to userscript.sh, specifying whether the
current context is document-start or document-end. Then within the uzbl config
the following can be done:

@on_event LOAD_COMMIT spawn @scripts_dir/userscripts.sh document-start
@on_event LOAD_FINISH spawn @scripts_dir/userscripts.sh document-end

Which allows userscripts to be run when they want. If the argument is ommited,
then userscript.sh runs on all scripts, preserving current behavior.

-----

This feature appears to be a standard respected by Greasemonkey (see http://wiki.greasespot.net/Metadata_Block#.40run-at ). Certainly I've noticed a number of scripts on userscripts.org using it