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:
parent
55f044f87a
commit
828a2917c4
1 changed files with 4 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue