* monkey userscripts for throwing bananas around the web — {violentmonkey,greasemonkey,tampermonkey}

Userscript phases & lifecycle #

@run-at controls when a userscript runs:

value when
document-start before any DOM is built; earliest hook (block/patch globals)
document-body as soon as <body> exists
document-end at DOMContentLoaded (DOM ready, subresources maybe not)
document-idle after load; default; safest for DOM reads (loader uses this)
context-menu only when invoked from the page context menu (where supported)

Injection context: managers run scripts in an isolated sandbox; reaching page globals needs unsafeWindow or a <script> element (what executeText does).

Docs #