I am developing a firefox extension, i need to detect which operating system firefox is running on but i can't seem to find and info on how to do it?
+3
A:
// Returns "WINNT" on Windows Vista, XP, 2000, and NT systems;
// "Linux" on GNU/Linux; and "Darwin" on Mac OS X.
var osString = Components.classes["@mozilla.org/xre/app-info;1"]
.getService(Components.interfaces.nsIXULRuntime).OS;
Hamza Yerlikaya
2009-09-13 21:54:55
For the reference: https://developer.mozilla.org/en/nsIXULRuntime
Nickolay
2009-10-12 06:22:14