Index: gc_lang/fr/webext/background.js ================================================================== --- gc_lang/fr/webext/background.js +++ gc_lang/fr/webext/background.js @@ -360,15 +360,10 @@ case "grammar_checker_iframe": sendCommandToTab(xTab.id, xInfo.menuItemId, xInfo.frameId); break; case "grammar_checker_selection": sendCommandToTab(xTab.id, xInfo.menuItemId, xInfo.selectionText); - oWorkerHandler.xGCEWorker.postMessage({ - sCommand: "parseAndSpellcheck", - oParam: {sText: xInfo.selectionText, sCountry: "FR", bDebug: false, bContext: false}, - oInfo: {iReturnPort: xTab.id} - }); break; // tools case "conjugueur_window": openConjugueurWindow(); break; 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 @@ -179,18 +179,18 @@ this.oMessageBox = new GrammalecteMessageBox("grammalecte_message_box", "Grammalecte"); this.oMessageBox.insertIntoPage(); } }, - startGCPanel: function (what, bCheckText=true) { + startGCPanel: function (what, xResultNode=null) { this.createGCPanel(); this.oGCPanel.clear(); this.oGCPanel.show(); this.oGCPanel.showEditor(); this.oGCPanel.start(what); this.oGCPanel.startWaitIcon(); - if (what && bCheckText) { + if (what) { let sText = this.oGCPanel.oTextControl.getText(); oGrammalecteBackgroundPort.parseAndSpellcheck(sText, "__GrammalectePanel__"); } }, @@ -464,12 +464,11 @@ break; case "grammar_checker_page": oGrammalecte.startGCPanel(oGrammalecte.getPageText()); break; case "grammar_checker_selection": - oGrammalecte.startGCPanel(result, false); // result is the selected text - // selected text is sent to the GC worker in the background script. + oGrammalecte.startGCPanel(result); // result is the selected text break; case "grammar_checker_iframe": console.log("[Grammalecte] selected iframe: ", result); if (document.activeElement.tagName == "IFRAME") { //console.log(document.activeElement.id); frameId given by result is different than frame.id