Skip to content

Instantly share code, notes, and snippets.

@arantius
Last active December 14, 2015 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arantius/5078045 to your computer and use it in GitHub Desktop.
Save arantius/5078045 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name API Leaker
// @namespace http://github.com/arantius
// @description Leaks GM API to content scope
// @include http*
// @version 1
// @grant GM_getValue
// @run-at document-start
// ==/UserScript==
if (window === top) {
dump('calling GM_getValue ...\n');
GM_getValue('x');
dump('exporting GM_getValue\n');
unsafeWindow.GM_getValue = GM_getValue;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment