diff --git a/chrome/content/zotero/customElements.js b/chrome/content/zotero/customElements.js index e93a729015..5880efc6e4 100644 --- a/chrome/content/zotero/customElements.js +++ b/chrome/content/zotero/customElements.js @@ -167,13 +167,20 @@ Services.scriptloader.loadSubScript('chrome://zotero/content/elements/librariesC // inject custom CSS into FF built-in custom elements (currently only ) const InjectCSSConfig = { - global: ["wizard"], + global: [ + "wizard", + { + element: "dialog", + patchedFunction: "connectedCallback" + } + ], win: [ "wizard", { element: "dialog", // The `attachShadow` are cleared in , we need to monkey-patch after `connectedCallback`. - patchee: "connectedCallback" + patchedFunction: "connectedCallback", + filename: "wizard-dialog" } ], mac: [], @@ -185,24 +192,24 @@ Services.scriptloader.loadSubScript('chrome://zotero/content/elements/librariesC if (key == "linux" && !Zotero.isLinux) continue; let prefix = ""; if (key == "global") { - prefix = "zotero/skin/"; + prefix = "zotero/skin/xulElementPatches/"; } else { - prefix = "zotero-platform/content/"; + prefix = "zotero-platform/content/xulElementPatches/"; } for (let config of configs) { - let element, patchee; + let element, patchedFunction; // By default, monkey-patch `attachShadow` if (typeof config === "string") { element = config; - patchee = "attachShadow"; + patchedFunction = "attachShadow"; } else { element = config.element; - patchee = config.patchee; + patchedFunction = config.patchedFunction; } - let oldFunc = customElements.get(element).prototype[patchee]; - customElements.get(element).prototype[patchee] = function () { + let oldFunc = customElements.get(element).prototype[patchedFunction]; + customElements.get(element).prototype[patchedFunction] = function () { let ret = oldFunc.apply(this, arguments); this.shadowRoot.append(MozXULElement.parseXULToFragment( `` diff --git a/chrome/content/zotero/integration/addCitationDialog.xhtml b/chrome/content/zotero/integration/addCitationDialog.xhtml index 8863f3e607..c70b71a380 100644 --- a/chrome/content/zotero/integration/addCitationDialog.xhtml +++ b/chrome/content/zotero/integration/addCitationDialog.xhtml @@ -34,6 +34,7 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + +