diff --git a/chrome/content/zotero/elements/toolbarbuttonDropmarker.js b/chrome/content/zotero/elements/toolbarbuttonDropmarker.js new file mode 100644 index 0000000000..729ca7ce45 --- /dev/null +++ b/chrome/content/zotero/elements/toolbarbuttonDropmarker.js @@ -0,0 +1,48 @@ +/* + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2022 Corporation for Digital Scholarship + Vienna, Virginia, USA + https://www.zotero.org + + This file is part of Zotero. + + Zotero is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Zotero is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with Zotero. If not, see . + + ***** END LICENSE BLOCK ***** +*/ + +"use strict"; + +{ + /** + * Extends MozToolbarbutton to use our own dropmarker image. + */ + class ToolbarbuttonDropmarker extends customElements.get('toolbarbutton') { + static get dropmarkerFragment() { + let frag = document.importNode( + MozXULElement.parseXULToFragment(` + + `), + true + ); + Object.defineProperty(this, "dropmarkerFragment", { value: frag }); + return frag; + } + } + + customElements.define("toolbarbutton-dropmarker", ToolbarbuttonDropmarker, { + extends: "toolbarbutton", + }); +} diff --git a/chrome/content/zotero/zoteroPane.xhtml b/chrome/content/zotero/zoteroPane.xhtml index c95678db6f..bd24280b14 100644 --- a/chrome/content/zotero/zoteroPane.xhtml +++ b/chrome/content/zotero/zoteroPane.xhtml @@ -83,6 +83,7 @@ Services.scriptloader.loadSubScript("chrome://zotero/content/elements/tagsBox.js", this); Services.scriptloader.loadSubScript("chrome://zotero/content/elements/relatedBox.js", this); Services.scriptloader.loadSubScript("chrome://zotero/content/elements/attachmentBox.js", this); + Services.scriptloader.loadSubScript("chrome://zotero/content/elements/toolbarbuttonDropmarker.js", this); Services.scriptloader.loadSubScript("chrome://zotero/content/tabs.js", this); Services.scriptloader.loadSubScript("chrome://zotero/content/zoteroPane.js", this); @@ -758,6 +759,7 @@ - @@ -837,6 +842,7 @@ dropmarker { - display: none; -} - .zotero-button-clear-image { list-style-image: none } @@ -731,7 +718,6 @@ @media (min-resolution: 1.25dppx) { #zotero-items-column-hasAttachment { list-style-image: url(chrome://zotero/skin/attach-small@2x.png); } #zotero-items-column-numNotes { list-style-image: url(chrome://zotero/skin/treeitem-note-small@2x.png); } - .toolbarbutton-menu-dropmarker { list-style-image: url('chrome://zotero/skin/searchbar-dropmarker@2x.png'); } #zotero-tb-collection-add { list-style-image: url('chrome://zotero/skin/toolbar-collection-add@2x.png'); } .zotero-menuitem-new-feed { list-style-image: url('chrome://zotero/skin/toolbar-feed-add@2x.png'); } #zotero-tb-library-add-menu { list-style-image: url('chrome://zotero/skin/library_add@2x.png'); }