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