]> git.saurik.com Git - apple/mdnsresponder.git/blob - Clients/FirefoxExtension/extension/content/overlay.js
mDNSResponder-878.270.2.tar.gz
[apple/mdnsresponder.git] / Clients / FirefoxExtension / extension / content / overlay.js
1 var bonjour4firefox =
2 {
3 onLoad: function()
4 {
5 // initialization code
6 this.initialized = true;
7 this.strings = document.getElementById("bonjour4firefox-strings");
8 },
9 onMenuItemCommand: function(e)
10 {
11 var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
12 promptService.alert(window, this.strings.getString("helloMessageTitle"), this.strings.getString("helloMessage"));
13 },
14 onToolbarButtonCommand: function(e)
15 {
16 // just reuse the function above. you can change this, obviously!
17 bonjour4firefox.onMenuItemCommand(e);
18 }
19 };
20
21 window.addEventListener("load", function(e) { bonjour4firefox.onLoad(e); }, false);