Reputation: 33
I would like to know how to detect OS Version in Firefox Extension which is made with Addon SDK. Can I detect it in my main.js?
Could you please let me know?
Upvotes: 1
Views: 142
Reputation: 5830
I don't think so, the closest you can get is the OS type. See the SDK's system
module:
https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/system#platform
var system = require("sdk/system"); console.log("platform = " + system.platform); // returns things like 'winnt', 'linux' and 'darwin'
You could use the child_process module to run uname
on UNIX systems or ver
on Windows to get additional info.
Upvotes: 1