blob: f989caaf22781a8eff0f83b4aec9a27ce48e4e18 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
var bonjour4firefox =
{
onLoad: function()
{
// initialization code
this.initialized = true;
this.strings = document.getElementById("bonjour4firefox-strings");
},
onMenuItemCommand: function(e)
{
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
promptService.alert(window, this.strings.getString("helloMessageTitle"), this.strings.getString("helloMessage"));
},
onToolbarButtonCommand: function(e)
{
// just reuse the function above. you can change this, obviously!
bonjour4firefox.onMenuItemCommand(e);
}
};
window.addEventListener("load", function(e) { bonjour4firefox.onLoad(e); }, false);
|