@grant

From GreaseSpot Wiki
Revision as of 17:42, 15 June 2012 by Arantius (talk | contribs) (Created page with "<div style="border: 3px dotted; color: red; font-size: 1.2em; padding: 0.5em; margin: 1em; text-align: center"> This page describes features that are currently unreleased. </d...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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.