Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
tabs = require("tabs");
widget = require("widget").Widget({
id: "widgetID1",
label: "My Mozilla Widget",
content: require("tabs").activeTab.url,
width: 400
});
tabs.on("ready", function(tab) {
widget.getView(tab.window).content = tabs.activeTab.url;
})
tabs.on("activate", function(tab) {
widget.getView(tab.window).content = tab.url;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment