Grammalecte  Check-in [f3aef226d4]

Overview
Comment:[fx] gc panel: check if error has property aColor
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fx
Files: files | file ages | folders
SHA3-256: f3aef226d4fd4947bfd94c1c6d47f94efca5d557dfbc5051bef6b0fcbdb6a316
User & Date: olr on 2020-03-27 12:28:00
Other Links: manifest | tags
Context
2020-03-27
12:45
[graphspell] suggestion: prevents splitting trailing numbers if not following an alpha character check-in: cbbb58a487 user: olr tags: trunk, graphspell
12:28
[fx] gc panel: check if error has property aColor check-in: f3aef226d4 user: olr tags: trunk, fx
12:01
[fr] mise à jour des dictionnaires, adaptation des règles check-in: fd348a300b user: olr tags: trunk, fr
Changes

Modified gc_lang/fr/webext/content_scripts/panel_gc.js from [8b9524e63b] to [79100c1e89].

357
358
359
360
361
362
363

364
365
366
367
368
369







370
371
372
373
374
375
376
357
358
359
360
361
362
363
364






365
366
367
368
369
370
371
372
373
374
375
376
377
378







+
-
-
-
-
-
-
+
+
+
+
+
+
+







            xNodeErr.dataset.gc_message = oErr['sMessage'];
            xNodeErr.dataset.gc_url = oErr['URL'];
            if (xNodeErr.dataset.gc_message.includes(" #")) {
                xNodeErr.dataset.line_id = oErr['sLineId'];
                xNodeErr.dataset.rule_id = oErr['sRuleId'];
            }
            xNodeErr.dataset.suggestions = oErr["aSuggestions"].join("|");
            if (oErr.hasOwnProperty("aColor")) {
            let sHue = oErr["aColor"][0].toString();
            let sSat = oErr["aColor"][1].toString();
            let sLum = oErr["aColor"][2].toString();
            xNodeErr.style.color = `hsl(${sHue}, ${sSat}%, 15%)`;
            xNodeErr.style.backgroundColor = `hsl(${sHue}, ${sSat}%, 85%)`;
            xNodeErr.style.borderBottom = `solid 2px hsl(${sHue}, ${sSat}%, ${sLum}%)`;
                let sHue = oErr["aColor"][0].toString();
                let sSat = oErr["aColor"][1].toString();
                let sLum = oErr["aColor"][2].toString();
                xNodeErr.style.color = `hsl(${sHue}, ${sSat}%, 15%)`;
                xNodeErr.style.backgroundColor = `hsl(${sHue}, ${sSat}%, 85%)`;
                xNodeErr.style.borderBottom = `solid 2px hsl(${sHue}, ${sSat}%, ${sLum}%)`;
            }
        }
        else {
            xNodeErr.className = "grammalecte_spellerror";
        }
        return xNodeErr;
    }