Skip to content

Commit

Permalink
Replace item in tools menu by item in popup menu
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Mar 21, 2024
1 parent 7ba01b9 commit 651564c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/zoteroocr.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,14 @@ addedElementIDs: [],
window.MozXULElement.insertFTLIfNeeded("zotero-ocr.ftl");

// Add menu option
let menuitem = doc.createElementNS(XUL_NS, 'menuitem');
let menuitem = doc.createXULElement('menuitem');
menuitem.id = 'ocr-selected-pdfs';
menuitem.setAttribute('type', 'checkbox');
menuitem.class = 'menuitem-iconic zotero-menuitem-ocr'
menuitem.setAttribute('data-l10n-id', 'ocr-selected-pdfs');
// MozMenuItem#checked is available in Zotero 7
doc.getElementById('zotero-itemmenu').appendChild(menuitem);
menuitem.addEventListener('command', () => {
// Zotero.OCR.openPreferenceWindow();
ZoteroOCR.recognize(window);
});
doc.getElementById('menu_ToolsPopup').appendChild(menuitem);
this.storeAddedElement(menuitem);
},

Expand Down

0 comments on commit 651564c

Please sign in to comment.