Overview
| Comment: | [fx] code clarification |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk | fx |
| Files: | files | file ages | folders |
| SHA3-256: |
6e5eaa6e688d78144975b56651431088 |
| User & Date: | olr on 2019-05-09 10:12:13 |
| Other Links: | manifest | tags |
Context
|
2019-05-10
| ||
| 08:51 | [fr] faux positif check-in: 105cb51271 user: olr tags: trunk, fr | |
|
2019-05-09
| ||
| 10:12 | [fx] code clarification check-in: 6e5eaa6e68 user: olr tags: trunk, fx | |
| 07:38 | [fr] ajustements check-in: fda207bea2 user: olr tags: trunk, fr | |
Changes
Modified gc_lang/fr/webext/content_scripts/init.js from [fe7209c432] to [f089b29107].
| ︙ | |||
169 170 171 172 173 174 175 176 177 178 179 180 181 182 | 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | + + + + + + + + + + + + + + + |
},
showMessage: function (sMessage) {
this.createMessageBox();
this.oMessageBox.show();
this.oMessageBox.setMessage(sMessage);
},
parseAndSpellcheck (xNode=null) {
this.startGCPanel(xNode);
let sText = "";
if (xNode) {
sText = (xNode.tagName == "TEXTAREA" || xNode.tagName == "INPUT") ? xNode.value.normalize("NFC") : xNode.innerText.normalize("NFC");
} else {
sText = this.getPageText();
}
xGrammalectePort.postMessage({
sCommand: "parseAndSpellcheck",
dParam: {sText: sText, sCountry: "FR", bDebug: false, bContext: false},
dInfo: (xNode) ? {sTextAreaId: xNode.id} : {}
});
},
getPageText: function () {
let sPageText = document.body.innerText;
let nPos = sPageText.indexOf("__grammalecte_panel__");
if (nPos >= 0) {
sPageText = sPageText.slice(0, nPos).normalize("NFC");
}
|
| ︙ | |||
321 322 323 324 325 326 327 | 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 | - + - + |
/*
Commands received from the context menu
(Context menu are initialized in background)
*/
// Grammar checker commands
case "grammar_checker_editable":
if (oGrammalecte.xRightClickedNode !== null) {
|
| ︙ | |||
353 354 355 356 357 358 359 | 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | - + - + - - - - - - - - - - - - - - - - - - - - - - - - |
let xActiveNode = document.activeElement;
switch (sActionRequest) {
/*
Commands received from the keyboard (shortcuts)
*/
case "shortcutGrammarChecker":
if (xActiveNode && (xActiveNode.tagName == "TEXTAREA" || xActiveNode.tagName == "INPUT" || xActiveNode.isContentEditable)) {
|
Modified gc_lang/fr/webext/content_scripts/menu.js from [12c726f5e2] to [7dabc515cf].
1 2 3 4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | - + - - - + - - - - - - - - - - - - + - - + - + + + - + + + + + + + - + - + - - - - | // JavaScript /* jshint esversion:6, -W097 */ /* jslint esversion:6 */ |
| ︙ |