Add Zotero.platformVersion and Zotero.platformMajorVersion

platformVersion is a string that needs to be checked with
nsIVersionComparator. platformMajorVersion is an integer that can be
checked with > and < when the major Gecko version is enough.
This commit is contained in:
Dan Stillman 2013-07-22 20:23:48 -04:00
parent 55f044f87a
commit 828a2917c4

View file

@ -223,9 +223,10 @@ Components.utils.import("resource://gre/modules/Services.jsm");
this.mainThread = Components.classes["@mozilla.org/thread-manager;1"].getService().mainThread;
var appInfo = Components.classes["@mozilla.org/xre/app-info;1"].
getService(Components.interfaces.nsIXULAppInfo),
platformVersion = appInfo.platformVersion;
var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
.getService(Components.interfaces.nsIXULAppInfo);
this.platformVersion = appInfo.platformVersion;
this.platformMajorVersion = parseInt(appInfo.platformVersion.match(/^[0-9]+/)[0]);
this.isFx = true;
this.isFx3 = false;
this.isFx35 = false;