User Tools

Site Tools


developer_center:recipe_book:extensions_and_core:detecting_nightingale

Detecting Nightingale

For extensions that want to support multiple browsers (e.g. Firefox, SeaMonkey, Nightingale, etc.), it can be necessary to check to see which app we're in. To check this you can check nsIXULAppInfo for either the application ID (.ID) or application name (.name)

var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
                  .getService(Components.interfaces.nsIXULAppInfo);
alert(appInfo.ID);   // should be nightingale@getnightingale.com
alert(appInfo.name); // should be Nightingale

If you're in a web page and utilising the Nightingale Webpage API, you can merely check for the presence of the songbird JavaScript object

developer_center/recipe_book/extensions_and_core/detecting_nightingale.txt · Last modified: 2013/12/28 08:30 by geekshadow