diff options
Diffstat (limited to 'mDNSResponder/Clients/FirefoxExtension/extension/content/overlay.js')
-rwxr-xr-x | mDNSResponder/Clients/FirefoxExtension/extension/content/overlay.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mDNSResponder/Clients/FirefoxExtension/extension/content/overlay.js b/mDNSResponder/Clients/FirefoxExtension/extension/content/overlay.js new file mode 100755 index 00000000..f989caaf --- /dev/null +++ b/mDNSResponder/Clients/FirefoxExtension/extension/content/overlay.js @@ -0,0 +1,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); |