Index: gc_lang/fr/webext/background.js ================================================================== --- gc_lang/fr/webext/background.js +++ gc_lang/fr/webext/background.js @@ -198,23 +198,23 @@ // Page browser.contextMenus.create({ id: "rightClickLxgPage", title: "Lexicographe (page)", - contexts: ["all"] + contexts: ["page"] }); browser.contextMenus.create({ id: "rightClickGCPage", title: "Correction grammaticale (page)", - contexts: ["all"] + contexts: ["page"] }); browser.contextMenus.create({ id: "separator_page", type: "separator", - contexts: ["all"] + contexts: ["page"] }); // Selected text browser.contextMenus.create({ id: "rightClickLxgSelectedText", Index: gc_lang/fr/webext/content_scripts/init.js ================================================================== --- gc_lang/fr/webext/content_scripts/init.js +++ gc_lang/fr/webext/content_scripts/init.js @@ -48,10 +48,12 @@ oGCPanel: null, xRightClickedNode: null, listenRightClick: function () { + // Node where a right click is done + // Bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1325814 document.addEventListener('contextmenu', function (xEvent) { this.xRightClickedNode = xEvent.target; }.bind(this), true); }, @@ -150,16 +152,10 @@ showError(e); } } } - -/* - Node where a right click is done - Bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1325814 -*/ - /* Connexion to the background */ let xGrammalectePort = browser.runtime.connect({name: "content-script port"});