Grant None Shim

By arantius Last update Sep 14, 2012 — Installed 1,709 times.

Script Summary: This script is intended to be used with @require, for Greasemonkey scripts using "@grant none". It emulates the GM_ APIs as closely as possible, using modern browser features like DOM storage.



So far, it has only been tested in Greasemonkey on Firefox.

Scripts should plan to remove usage of GM_ APIs, but this shim offers a
short-term workaround to gain the benefits of running in the security
restriction free "@grant none" mode before that is completed.

Read the comments on each function to learn if its emulation is good enough
for your purposes.

NOT IMPLEMENTED:
* GM_getResourceText
* GM_openInTab
* GM_registerMenuCommand