From b1dbe35102fb7dbd547d233b54a01a6368b4e806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Mon, 25 Aug 2025 12:12:07 +0300 Subject: [PATCH] Fix note type picker appearing for Google Docs Report https://forums.zotero.org/discussion/126026/endnotes-option-showing-in-google-docs --- .../content/zotero/elements/styleConfigurator.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/elements/styleConfigurator.js b/chrome/content/zotero/elements/styleConfigurator.js index 39df45351b..eb337c3c7b 100644 --- a/chrome/content/zotero/elements/styleConfigurator.js +++ b/chrome/content/zotero/elements/styleConfigurator.js @@ -276,15 +276,24 @@ } }); } - - handleStyleChanged(style) { - this.querySelector('#locale-selector').style = style; + + toggleNoteTypePicker(style) { const styleData = style ? Zotero.Styles.get(style) : null; const isNoteStyle = (styleData || {}).class === 'note'; const noMultipleNotes = this.hasAttribute('no-multi-notes'); this.querySelector('.display-as-wrapper').style.display = (isNoteStyle && !noMultipleNotes) ? '' : 'none'; } + + toggleAttribute(name, force) { + super.toggleAttribute(name, force); + this.toggleNoteTypePicker(this.querySelector('#locale-selector').style); + } + + handleStyleChanged(style) { + this.querySelector('#locale-selector').style = style; + this.toggleNoteTypePicker(style); + } } customElements.define('locale-selector', LocaleSelector);