Remove Zotero.platform and Zotero.oscpu and add Zotero.arch

`Zotero.arch` == `aarch64`, `x86_64`, `x86`
This commit is contained in:
Dan Stillman 2024-04-06 04:38:51 -04:00
parent 20d6cde85f
commit 78c0a3d050

View file

@ -238,11 +238,13 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js");
var win = Components.classes["@mozilla.org/appshell/appShellService;1"]
.getService(Components.interfaces.nsIAppShellService)
.hiddenDOMWindow;
this.platform = win.navigator.platform;
this.isMac = this.platform.substr(0, 3) == "Mac";
this.isWin = (this.platform.substr(0, 3) == "Win");
this.isLinux = (this.platform.substr(0, 5) == "Linux");
this.oscpu = win.navigator.oscpu;
var os = Services.appinfo.OS;
this.isMac = os == 'Darwin';
this.isWin = os == 'WINNT';
this.isLinux = os == 'Linux';
// aarch64, x86_64, x86
this.arch = Services.appinfo.XPCOMABI.split('-')[0];
// Browser
Zotero.browser = "g";