From 08ffa64abf04ab8026f0fc582b48dd29582f02a0 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 29 May 2024 06:48:12 -0400 Subject: [PATCH] Add `Zotero.isBetaBuild` and fix `Zotero.isDevBuild` Previously `isDevBuild` was true for beta, dev, or source builds (but also wasn't used anywhere) --- chrome/content/zotero/xpcom/zotero.js | 9 ++++----- chrome/content/zotero/zoteroPane.js | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 5dbccbbef9..3f199e4369 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -229,11 +229,10 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js"); this.isClient = true; this.isStandalone = true; - Zotero.version = Services.appinfo.version; - Zotero.isDevBuild = Zotero.version.includes('beta') - || Zotero.version.includes('dev') - || Zotero.version.includes('SOURCE'); - Zotero.isSourceBuild = Zotero.version.includes('SOURCE'); + this.version = Services.appinfo.version; + this.isBetaBuild = Zotero.version.includes('-beta'); + this.isDevBuild = Zotero.version.includes('-dev'); + this.isSourceBuild = Zotero.version.includes('SOURCE'); // OS platform var win = Components.classes["@mozilla.org/appshell/appShellService;1"] diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index e78fb52777..2bd6760f03 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -511,7 +511,7 @@ var ZoteroPane = new function() // Show warning in toolbar for 'dev' channel builds and troubleshooting mode try { let afterElement = 'zotero-tb-tabs-menu'; - let isDevBuild = Zotero.version.includes('-dev'); + let isDevBuild = Zotero.isDevBuild; let isSafeMode = Services.appinfo.inSafeMode; // Uncomment to test //isDevBuild = true;