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 @@ -145,11 +145,11 @@ } }, createGCPanel: function () { if (this.oGCPanel === null) { - this.oGCPanel = new GrammalecteGrammarChecker("grammalecte_gc_panel", "Grammalecte", 500, 700); + this.oGCPanel = new GrammalecteGrammarChecker("grammalecte_gc_panel", "Grammalecte", 540, 700); this.oGCPanel.insertIntoPage(); } }, createMessageBox: function () { Index: gc_lang/fr/webext/content_scripts/panel.css ================================================================== --- gc_lang/fr/webext/content_scripts/panel.css +++ gc_lang/fr/webext/content_scripts/panel.css @@ -66,15 +66,15 @@ text-align: center; cursor: pointer; } div.grammalecte_copy_button { border-radius: 2px; - color: hsla(150, 0%, 100%, .5); + color: hsla(210, 0%, 100%, .5); } div.grammalecte_copy_button:hover { - background-color: hsl(150, 90%, 35%); - color: hsla(150, 0%, 100%, 1); + background-color: hsl(210, 90%, 35%, .5); + color: hsla(210, 0%, 100%, 1); } div.grammalecte_move_button { padding: 1px 5px; border-radius: 16px; color: hsla(180, 0%, 100%, .5); 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 @@ -77,11 +77,11 @@ let xWaitIcon = oGrammalecte.createNode("div", {className: "grammalecte_spinner"}); return xWaitIcon; } _createCopyButton () { - let xButton = oGrammalecte.createNode("div", {id: "grammalecte_clipboard_button", className: "grammalecte_panel_button grammalecte_copy_button", textContent: "📋", title: "Copier dans le presse-papiers"}); + let xButton = oGrammalecte.createNode("div", {id: "grammalecte_clipboard_button", className: "grammalecte_panel_button grammalecte_copy_button", textContent: "📋", title: "Copier le contenu de l’éditeur dans le presse-papiers"}); xButton.onclick = () => { this.copyTextToClipboard(); }; return xButton; } _createMoveButton (sAction, sLabel, sTitle) { Index: gc_lang/fr/webext/content_scripts/panel_conj.css ================================================================== --- gc_lang/fr/webext/content_scripts/panel_conj.css +++ gc_lang/fr/webext/content_scripts/panel_conj.css @@ -35,10 +35,11 @@ display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: center; align-items: flex-start; + padding: 0 10px; } div.grammalecte_conj_column { width: 50%; padding: 0 10px; 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 @@ -76,11 +76,11 @@ this.xMenu = oGrammalecte.createNode("div", {className: "grammalecte_panel_menu"}); this.xTFButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_button", textContent: "Formateur de texte"}); this.xEditorButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_button", textContent: "Éditeur"}); this.xLxgButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_button", textContent: "Lexicographe"}); this.xConjButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_button", textContent: "Conjugueur"}); - this.xLEButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_button", textContent: "Éditeur lexical ⮭"}); + this.xLEButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_button", textContent: "•Éditeur lexical•"}); this.xTFButton.onclick = () => { if (this.xNode && (this.xNode.tagName == "TEXTAREA" || this.xNode.tagName == "INPUT" || this.xNode.isContentEditable)) { oGrammalecte.createTFPanel(); oGrammalecte.oTFPanel.start(this); oGrammalecte.oTFPanel.show(); @@ -319,11 +319,10 @@ xParagraph.contentEditable = "false"; this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).textContent = "!!"; this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).style.backgroundColor = "hsl(0, 50%, 50%)"; this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).style.boxShadow = "0 0 0 3px hsla(0, 0%, 50%, .2)"; this.xParent.getElementById("grammalecte_check"+xParagraph.dataset.para_num).style.animation = "grammalecte-pulse 1s linear infinite"; - } freeParagraph (xParagraph) { xParagraph.contentEditable = "true"; let nStart = parseInt(xParagraph.dataset.caret_position_start); @@ -391,20 +390,19 @@ copyTextToClipboard () { this.startWaitIcon(); try { let xClipboardButton = this.xParent.getElementById("grammalecte_clipboard_button"); - xClipboardButton.textContent = "->>"; + xClipboardButton.textContent = "⇒ presse-papiers"; let sText = ""; // Quand c'est dans un shadow "this.xParent.getElementsByClassName" n'existe pas. let xElem = this.xParent.getElementById("grammalecte_gc_panel"); for (let xNode of xElem.getElementsByClassName("grammalecte_paragraph")) { sText += xNode.textContent + "\n"; } this._copyToClipboard(sText); - xClipboardButton.textContent = "⇒ presse-papiers"; - window.setTimeout(function() { xClipboardButton.textContent = "📋"; } , 2000); + window.setTimeout(() => { xClipboardButton.textContent = "📋"; }, 2000); } catch (e) { showError(e); } this.stopWaitIcon(); @@ -518,11 +516,10 @@ this.xParent.getElementById('grammalecte_conj_oneg').checked = false; this.xParent.getElementById('grammalecte_conj_opro').checked = false; this.xParent.getElementById('grammalecte_conj_oint').checked = false; this.xParent.getElementById('grammalecte_conj_otco').checked = false; this.xParent.getElementById('grammalecte_conj_ofem').checked = false; - // request analyzing sVerb = sVerb.trim().toLowerCase().replace(/’/g, "'").replace(/ +/g, " "); if (sVerb) { if (sVerb.startsWith("ne pas ")) { this.xParent.getElementById('grammalecte_conj_oneg').checked = true; @@ -557,11 +554,10 @@ let bNeg = this.xParent.getElementById('grammalecte_conj_oneg').checked; let bTpsCo = this.xParent.getElementById('grammalecte_conj_otco').checked; let bInt = this.xParent.getElementById('grammalecte_conj_oint').checked; let bFem = this.xParent.getElementById('grammalecte_conj_ofem').checked; if (this.sVerb) { - console.log("updateConj send"); xGrammalectePort.postMessage({ sCommand: "getVerb", dParam: {sVerb: this.sVerb, bPro: bPro, bNeg: bNeg, bTpsCo: bTpsCo, bInt: bInt, bFem: bFem}, dInfo: {} }); @@ -569,44 +565,44 @@ } conjugateWith (oVerb, oConjTable) { // function called when results come from the Worker if (oVerb) { - this.xParent.getElementById('grammalecte_conj_verb').style = "color: #999999;"; + this.xParent.getElementById('grammalecte_conj_verb').style.color = "#999999"; this.xParent.getElementById('grammalecte_conj_verb').value = ""; this.xParent.getElementById('grammalecte_conj_verb_title').textContent = oVerb.sVerb; this.xParent.getElementById('grammalecte_conj_verb_info').textContent = oVerb.sInfo; - this.xParent.getElementById('grammalecte_conj_opro').textContent = oVerb.sProLabel; + this.xParent.getElementById('grammalecte_conj_opro_lbl').textContent = oVerb.sProLabel; if (oVerb.bUncomplete) { this.xParent.getElementById('grammalecte_conj_opro').checked = false; this.xParent.getElementById('grammalecte_conj_opro').disabled = true; - this.xParent.getElementById('grammalecte_conj_opro_lbl').style = "color: #CCC;"; + this.xParent.getElementById('grammalecte_conj_opro_lbl').style.color = "#CCC"; this.xParent.getElementById('grammalecte_conj_otco').checked = false; this.xParent.getElementById('grammalecte_conj_otco').disabled = true; - this.xParent.getElementById('grammalecte_conj_otco_lbl').style = "color: #CCC;"; + this.xParent.getElementById('grammalecte_conj_otco_lbl').style.color = "#CCC"; this.xParent.getElementById('grammalecte_conj_note').textContent = "Ce verbe n’a pas encore été vérifié. C’est pourquoi les options “pronominal” et “temps composés” sont désactivées."; } else { this.xParent.getElementById('grammalecte_conj_otco').disabled = false; - this.xParent.getElementById('grammalecte_conj_otco_lbl').style = "color: #000;"; + this.xParent.getElementById('grammalecte_conj_otco_lbl').style.color = "#000"; if (oVerb.nPronominable == 0) { this.xParent.getElementById('grammalecte_conj_opro').checked = false; this.xParent.getElementById('grammalecte_conj_opro').disabled = false; - this.xParent.getElementById('grammalecte_conj_opro_lbl').style = "color: #000;"; + this.xParent.getElementById('grammalecte_conj_opro_lbl').style.color = "#000"; } else if (oVerb.nPronominable == 1) { this.xParent.getElementById('grammalecte_conj_opro').checked = true; this.xParent.getElementById('grammalecte_conj_opro').disabled = true; - this.xParent.getElementById('grammalecte_conj_opro_lbl').style = "color: #CCC;"; + this.xParent.getElementById('grammalecte_conj_opro_lbl').style.color = "#CCC"; } else { // -1 or 1 or error this.xParent.getElementById('grammalecte_conj_opro').checked = false; this.xParent.getElementById('grammalecte_conj_opro').disabled = true; - this.xParent.getElementById('grammalecte_conj_opro_lbl').style = "color: #CCC;"; + this.xParent.getElementById('grammalecte_conj_opro_lbl').style.color = "#CCC"; } this.xParent.getElementById('grammalecte_conj_note').textContent = "❦"; } this._displayConj(oConjTable); } else { - this.xParent.getElementById('grammalecte_conj_verb').style = "color: #BB4411;"; + this.xParent.getElementById('grammalecte_conj_verb').style.color = "#BB4411"; } } _displayConj (oConjTable) { if (oConjTable === null) {