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;
}
|