Skip to content

Instantly share code, notes, and snippets.

@reek
Created April 9, 2015 14:55
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 reek/0e302e8d2dd4a614b085 to your computer and use it in GitHub Desktop.
Save reek/0e302e8d2dd4a614b085 to your computer and use it in GitHub Desktop.
GM_registerMenuCommand @run-at document-start
// ==UserScript==
// @name test
// @namespace test
// @include *
// @version 1
// @grant GM_registerMenuCommand
// @run-at document-start
// ==/UserScript==
(function () {
GM_registerMenuCommand('Test1', function () {
location.href = "https://getfirebug.com/";
});
}());
window.addEventListener('load', function () {
GM_registerMenuCommand('Test2', function () {
location.href = "https://getfirebug.com/";
});
});
setTimeout(function () {
GM_registerMenuCommand('Test3', function () {
location.href = "https://getfirebug.com/";
});
}, 0)
GM_registerMenuCommand('Test4', function () {
location.href = "https://getfirebug.com/";
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment