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 @@ -86,13 +86,13 @@ /* Connexion to the background */ -let xPort = browser.runtime.connect({name: "content-script port"}); +let xGrammalectePort = browser.runtime.connect({name: "content-script port"}); -xPort.onMessage.addListener(function (oMessage) { +xGrammalectePort.onMessage.addListener(function (oMessage) { let {sActionDone, result, dInfo, bEnd, bError} = oMessage; switch (sActionDone) { case "parseAndSpellcheck": if (!bEnd) { oGrammalecte.oGCPanel.addParagraphResult(result); Index: gc_lang/fr/webext/content_scripts/panel.js ================================================================== --- gc_lang/fr/webext/content_scripts/panel.js +++ gc_lang/fr/webext/content_scripts/panel.js @@ -136,12 +136,12 @@ stopWaitIcon () { this.xWaitIcon.style.visibility = "hidden"; } openURL (sURL) { - xPort.postMessage({ + xGrammalectePort.postMessage({ sCommand: "openURL", dParam: {"sURL": sURL}, dInfo: {} }); } } Index: gc_lang/fr/webext/content_scripts/panel_gc.js ================================================================== --- gc_lang/fr/webext/content_scripts/panel_gc.js +++ gc_lang/fr/webext/content_scripts/panel_gc.js @@ -105,11 +105,11 @@ recheckParagraph (iParaNum) { let sParagraphId = "grammalecte_paragraph" + iParaNum; let xParagraph = document.getElementById(sParagraphId); this.blockParagraph(xParagraph); let sText = this.purgeText(xParagraph.textContent); - xPort.postMessage({ + xGrammalectePort.postMessage({ sCommand: "parseAndSpellcheck1", dParam: {sText: sText, sCountry: "FR", bDebug: false, bContext: false}, dInfo: {sParagraphId: sParagraphId} }); this.oTAC.setParagraph(iParaNum, sText); Index: gc_lang/fr/webext/content_scripts/wrapper.js ================================================================== --- gc_lang/fr/webext/content_scripts/wrapper.js +++ gc_lang/fr/webext/content_scripts/wrapper.js @@ -25,16 +25,16 @@ let xConjButton = createNode("div", {className: "grammalecte_wrapper_button", textContent: "Conjuguer"}); xConjButton.onclick = () => { this.showConjButtons(); }; let xConjSection = createNode("div", {id: "grammalecte_wrapper_conj_section"+this.nWrapper, className: "grammalecte_wrapper_conj_section"}); let xConjButtonTab = createNode("div", {className: "grammalecte_wrapper_button2", textContent: ">Onglet"}); xConjButtonTab.onclick = function () { - xPort.postMessage({sCommand: "openConjugueurTab", dParam: null, dInfo: null}); + xGrammalectePort.postMessage({sCommand: "openConjugueurTab", dParam: null, dInfo: null}); this.hideConjButtons(); }.bind(this); let xConjButtonWin = createNode("div", {className: "grammalecte_wrapper_button2", textContent: ">FenĂȘtre"}); xConjButtonWin.onclick = function () { - xPort.postMessage({sCommand: "openConjugueurWindow", dParam: null, dInfo: null}); + xGrammalectePort.postMessage({sCommand: "openConjugueurWindow", dParam: null, dInfo: null}); this.hideConjButtons(); }.bind(this); let xTFButton = createNode("div", {className: "grammalecte_wrapper_button", textContent: "Formater"}); xTFButton.onclick = function () { oGrammalecte.createTFPanel(); @@ -45,11 +45,11 @@ xLxgButton.onclick = function () { oGrammalecte.createLxgPanel(); oGrammalecte.oLxgPanel.clear(); oGrammalecte.oLxgPanel.show(); oGrammalecte.oLxgPanel.startWaitIcon(); - xPort.postMessage({ + xGrammalectePort.postMessage({ sCommand: "getListOfTokens", dParam: {sText: xTextArea.value}, dInfo: {sTextAreaId: xTextArea.id} }); }; @@ -58,11 +58,11 @@ oGrammalecte.createGCPanel(); oGrammalecte.oGCPanel.clear(); oGrammalecte.oGCPanel.show(); oGrammalecte.oGCPanel.start(xTextArea); oGrammalecte.oGCPanel.startWaitIcon(); - xPort.postMessage({ + xGrammalectePort.postMessage({ sCommand: "parseAndSpellcheck", dParam: {sText: xTextArea.value, sCountry: "FR", bDebug: false, bContext: false}, dInfo: {sTextAreaId: xTextArea.id} }); };