From ebf45a32321151f100a526338c98090660cf25d2 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 25 Feb 2021 03:22:27 -0500 Subject: [PATCH] Fix tab bar initialization on macOS after isPDFBuild change --- chrome/content/zotero/standalone/standalone.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/standalone/standalone.js b/chrome/content/zotero/standalone/standalone.js index 29e3043ca8..9819910149 100644 --- a/chrome/content/zotero/standalone/standalone.js +++ b/chrome/content/zotero/standalone/standalone.js @@ -41,13 +41,14 @@ const ZoteroStandalone = new function() { if (Zotero.isMac && window.document.documentElement.getAttribute('sizemode') == 'fullscreen') { window.document.documentElement.setAttribute('sizemode', 'normal'); } - - if (Zotero.isMac && Zotero.isPDFBuild) { + + // Create tab bar by default + if (Zotero.isMac) { document.documentElement.setAttribute('drawintitlebar', true); document.documentElement.setAttribute('tabsintitlebar', true); document.documentElement.setAttribute('chromemargin', '0,-1,-1,-1'); } - + this.switchMenuType('library'); Zotero.Notifier.registerObserver( { @@ -80,6 +81,13 @@ const ZoteroStandalone = new function() { ZoteroStandalone.DebugOutput.init(); + // TEMP: Remove tab bar if not PDF build + if (Zotero.isMac && !Zotero.isPDFBuild) { + document.documentElement.removeAttribute('drawintitlebar'); + document.documentElement.removeAttribute('tabsintitlebar'); + document.documentElement.removeAttribute('chromemargin'); + } + Zotero.hideZoteroPaneOverlays(); ZoteroPane.init(); ZoteroPane.makeVisible();