@grant
From GreaseSpot Wiki
This page describes features that are currently unreleased.
Greasemonkey 1.0 adds a special Metadata Block imperative: @grant
.
As of version 1.0:
- If a script does not specify any
@grant
values, Greasemonkey will attempt to auto-detect the right settings. - If a script specifies any values (or they have been auto detected), then it will be provided with only those API methods that it declares.
- Otherwise the script will be granted no special API privileges, and thus run without the security constraints Greasemonkey scripts have traditionally had. If you want your script to operate in this mode, you should explicitly declare
@grant none
.