Index: gc_lang/fr/webext/background.js ================================================================== --- gc_lang/fr/webext/background.js +++ gc_lang/fr/webext/background.js @@ -258,10 +258,13 @@ case "openConjugueurTab": openConjugueurTab(); break; case "openConjugueurWindow": openConjugueurWindow(); + break; + case "openLexiconEditor": + openLexiconEditor(); break; default: console.log("[background] Unknown command: " + sCommand); console.log(oRequest); } Index: gc_lang/fr/webext/content_scripts/menu.js ================================================================== --- gc_lang/fr/webext/content_scripts/menu.js +++ gc_lang/fr/webext/content_scripts/menu.js @@ -116,10 +116,17 @@ dParam: {sText: this._getText(), sCountry: "FR", bDebug: false, bContext: false}, dInfo: {sTextAreaId: this.xNode.id} }); }; xMenu.appendChild(xGCButton); + // Lexicon editor + let xLEButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_item", textContent: "Éditeur lexical"}); + xLEButton.onclick = () => { + this.switchMenu(); + xGrammalectePort.postMessage({sCommand: "openLexiconEditor", dParam: null, dInfo: null}); + }; + xMenu.appendChild(xLEButton); // Conjugation tool let xConjButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_item_block", textContent: "Conjugueur"}); let xConjButtonTab = oGrammalecte.createNode("div", {className: "grammalecte_menu_button", textContent: "Onglet"}); xConjButtonTab.onclick = () => { this.switchMenu();