Skip to content

Instantly share code, notes, and snippets.

@wbamberg
Created July 25, 2011 23:45
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 wbamberg/1105560 to your computer and use it in GitHub Desktop.
Save wbamberg/1105560 to your computer and use it in GitHub Desktop.
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