Created
October 6, 2012 05:37
-
-
Save debloper/3844059 to your computer and use it in GitHub Desktop.
Restartless Addon Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var contextMenu = require("context-menu"); | |
var tabs = require("tabs"); | |
var aboutContextMenu = contextMenu.Menu({ | |
label: "About Pages", | |
contentScript: 'on("click", function (node, data) {' + | |
' postMessage(data.toString());' + | |
'});', | |
onMessage: function(url) { | |
tabs.open(url); | |
}, | |
items: [ | |
contextMenu.Item({ label: "About:Home", data: "about:home" }), | |
contextMenu.Item({ label: "About:Addons", data: "about:addons" }), | |
contextMenu.Item({ label: "About:Plugins", data: "about:plugins" }), | |
contextMenu.Item({ label: "About:Config", data: "about:config" }), | |
contextMenu.Item({ label: "About:Support", data: "about:support" }), | |
contextMenu.Separator(), | |
contextMenu.Item({ label: "All Abouts", data: "about:about" }) | |
] | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment