Prefer use of Services.appinfo
This commit is contained in:
parent
b2a1977d5a
commit
06cb9aff98
2 changed files with 3 additions and 7 deletions
|
@ -190,10 +190,8 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js");
|
|||
|
||||
this.clientName = ZOTERO_CONFIG.CLIENT_NAME;
|
||||
|
||||
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.platformVersion = Services.appinfo.platformVersion;
|
||||
this.platformMajorVersion = parseInt(this.platformVersion.match(/^[0-9]+/)[0]);
|
||||
this.isFx = true;
|
||||
this.isClient = true;
|
||||
this.isStandalone = Services.appinfo.ID == ZOTERO_CONFIG['GUID'];
|
||||
|
|
|
@ -456,9 +456,7 @@ var _isStandalone = null;
|
|||
*/
|
||||
function isStandalone() {
|
||||
if(_isStandalone === null) {
|
||||
var appInfo = Components.classes["@mozilla.org/xre/app-info;1"].
|
||||
getService(Components.interfaces.nsIXULAppInfo);
|
||||
_isStandalone = appInfo.ID === 'zotero@chnm.gmu.edu';
|
||||
_isStandalone = Services.appinfo.ID === 'zotero@chnm.gmu.edu';
|
||||
}
|
||||
return _isStandalone;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue