From 78c0a3d050c65cc2ec4210a808f2862ace6f813a Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 6 Apr 2024 04:38:51 -0400 Subject: [PATCH] Remove `Zotero.platform` and `Zotero.oscpu` and add `Zotero.arch` `Zotero.arch` == `aarch64`, `x86_64`, `x86` --- chrome/content/zotero/xpcom/zotero.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index c06a135899..7157db111f 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -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";