Skip to content

Instantly share code, notes, and snippets.

@sizzlemctwizzle
Created March 27, 2011 01:49
Show Gist options
  • Select an option

  • Save sizzlemctwizzle/888832 to your computer and use it in GitHub Desktop.

Select an option

Save sizzlemctwizzle/888832 to your computer and use it in GitHub Desktop.
GM_registerMenuCommand Test Case
// ==UserScript==
// @name GM_registerMenuCommand Test Case
// @namespace sizzlemctwizzle
// @description Test GM_registerMenuCommand
// @include *
// ==/UserScript==
GM_registerMenuCommand("Test Command", function() { alert('Command selected'); });
var div = document.createElement('div');
div.textContent = "This text is added to the page when the script runs.";
document.body.appendChild(div);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment