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 @@ -47,11 +47,10 @@ nMenu: 0, lMenu: [], oTFPanel: null, - //oLxgPanel: null, oGCPanel: null, oMessageBox: null, xRightClickedNode: null, @@ -396,12 +395,12 @@ }); } function parseAndSpellcheckEditableNode (xNode) { oGrammalecte.startGCPanel(xNode); - let sText = (xNode.tagName == "TEXTAREA" || xNode.tagName == "INPUT") ? xNode.value : xNode.innerText; + let sText = (xNode.tagName == "TEXTAREA" || xNode.tagName == "INPUT") ? xNode.value.normalize("NFC") : xNode.innerText.normalize("NFC"); xGrammalectePort.postMessage({ sCommand: "parseAndSpellcheck", dParam: {sText: sText, sCountry: "FR", bDebug: false, bContext: false}, dInfo: {sTextAreaId: xNode.id} }); } 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 @@ -63,11 +63,11 @@ window.setTimeout(() => {this.xButton.style.display = "none";}, 300); });*/ } _getText () { - return (this.xNode.tagName == "TEXTAREA") ? this.xNode.value.normalize("NFC") : this.xNode.innerText.normalize("NFC"); + return (this.xNode.tagName == "TEXTAREA" || this.xNode.tagName == "INPUT") ? this.xNode.value.normalize("NFC") : this.xNode.innerText.normalize("NFC") } deleteNodes () { if (this.bShadow) { this.xShadowBtn.parentNode.removeChild(this.xShadowBtn); 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 @@ -29,83 +29,103 @@ } div.grammalecte_panel_bar { position: sticky; width: 100%; - background-color: hsl(210, 20%, 92%); + background-color: hsl(210, 50%, 50%); border-radius: 10px 10px 0 0; border-bottom: 1px solid hsl(210, 20%, 86%); - color: hsl(210, 30%, 40%); - font-size: 20px; + } div.grammalecte_panel_title { - padding: 10px 20px; + padding: 3px 20px; + color: hsl(210, 30%, 96%); + font-size: 20px; } div.grammalecte_panel_label { display: inline-block; padding: 0 10px; font-family: "Trebuchet MS", "Fira Sans", "Liberation Sans", sans-serif; } div.grammalecte_panel_invisible_marker { position: absolute; /*visibility: hidden;*/ - font-size: 6px; - color: hsl(210, 0%, 90%); /* same color than panel_bar background */ + font-size: 4px; + color: hsla(210, 0%, 90%, 0); } div.grammalecte_panel_commands { float: right; } div.grammalecte_copy_button { display: inline-block; - padding: 2px 10px; - background-color: hsl(150, 80%, 30%); + padding: 1px 10px; border-radius: 0 0 0 3px; font-family: "Trebuchet MS", "Fira Sans", "Liberation Sans", sans-serif; - font-size: 22px; + font-size: 14px; font-weight: bold; - color: hsl(150, 0%, 100%); + color: hsla(150, 0%, 100%, .5); text-align: center; cursor: pointer; } div.grammalecte_copy_button:hover { background-color: hsl(150, 90%, 35%); + color: hsla(150, 0%, 100%, 1); } div.grammalecte_move_button { display: inline-block; - padding: 2px 5px; - background-color: hsl(180, 50%, 60%); + padding: 1px 5px; font-family: "Trebuchet MS", "Fira Sans", "Liberation Sans", sans-serif; - font-size: 22px; + font-size: 14px; font-weight: bold; - color: hsl(180, 0%, 100%); + color: hsla(180, 0%, 100%, .5); text-align: center; cursor: pointer; } div.grammalecte_move_button:hover { background-color: hsl(180, 80%, 65%); + color: hsla(180, 0%, 100%, 1); } div.grammalecte_close_button { display: inline-block; - padding: 2px 10px; + padding: 1px 10px; border-radius: 0 8px 0 0; - background-color: hsl(0, 80%, 50%); + background-color: hsla(0, 80%, 50%, .5); font-family: "Trebuchet MS", "Fira Sans", "Liberation Sans", sans-serif; - font-size: 22px; + font-size: 14px; font-weight: bold; - color: hsl(210, 0%, 100%); + color: hsla(210, 0%, 100%, .5); text-align: center; cursor: pointer; } div.grammalecte_close_button:hover { background-color: hsl(0, 100%, 60%); + color: hsla(210, 0%, 100%, 1); +} + +div.grammalecte_panel_menu { + display: flex; + flex-direction: row; + justify-content: space-around; +} +div.grammalecte_menu_button { + color: hsl(210, 50%, 96%); + padding: 5px 10px; + font-size: 12px; + font-variant: small-caps; + cursor: pointer; + border-radius: 3px; +} +div.grammalecte_menu_button:hover { + background-color: hsl(210, 80%, 40%); } + div.grammalecte_panel_content { position: absolute; width: 100%; - height: calc(100% - 75px); /* panel height - title_bar */ + height: calc(100% - 65px); /* panel height - title_bar */ overflow: auto; } div.grammalecte_panel_message { margin: 10px; @@ -116,27 +136,11 @@ font-family: "Trebuchet MS", "Fira Sans", "Liberation Sans", sans-serif; font-size: 16px; } -div.grammalecte_panel_menu { - display: flex; - flex-direction: row; - justify-content: space-around; - background-color: hsl(210, 50%, 50%); -} -div.grammalecte_menu_button { - color: hsl(210, 50%, 96%); - padding: 5px 10px; - font-size: 12px; - font-variant: small-caps; - cursor: pointer; - border-radius: 3px; -} -div.grammalecte_menu_button:hover { - background-color: hsl(210, 80%, 40%); -} + /* Spinner */