Tampermonkey® by Jan Biniok

@run-at

Defines the moment the script is injected. In opposition to other script handlers, @run-at defines the first possible moment a script wants to run. This means it may happen, that a script that uses the @require tag may be executed after the document is already loaded, cause fetching the required script took that long.

Anyhow, all DOMNodeInserted, DOMContentLoaded and load events fired after the given injection moment are cached and delivered to listeners registered via the sandbox's window.addEventListener method.

// @run-at document-start

The script will be injected as fast as possible.

// @run-at document-body

The script will be injected if the body element exists.

// @run-at document-end

The script will be injected when or after the DOMContentLoaded event was dispatched.

// @run-at document-idle

The script will be injected after the DOMContentLoaded event was dispatched. This is the default value if no @run-at tag is given.

// @run-at context-menu

The script will be injected if it is clicked at the browser context menu.

Note: all @include and @exclude statements will be ignored if this value is used, but this may change in the future.