[Greasemonkey] Safely dropping privileges?

Lenny Domnitser ldrhcp at gmail.com
Wed Apr 5 22:04:46 EDT 2006


On 4/4/06, Mook <mook.moz+sites.org.mozdev.lists.greasemonkey at gmail.com> wrote:
> I want to write a user script that:
> 1) Does not need any of the elevated privileges provided by Greasemonkey (GM_*)
> 2) Needs to poke unsafeWindow a lot

Try GM_executeContentScript, from CVS (in miscapis.js [1]). It does
not require elevated priveledges, so you can copy it into your script.
A string or function you pass to GM_executeContentScript will run in
the context of a bookmarklet.

[1]: http://www.mozdev.org/source/browse/greasemonkey/src/chrome/chromeFiles/content/miscapis.js


More information about the Greasemonkey mailing list