User Tools

Site Tools


developer_center:recipe_book:extensions_and_core:detecting_nightingale

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

developer_center:recipe_book:extensions_and_core:detecting_nightingale [2013/12/28 08:30] (current)
geekshadow created
Line 1: Line 1:
 +====== 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)
 +
 +<​code>​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</​code>​
 +
 +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