Overview
Comment: | [tb] code cleaning |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | tb | multid |
Files: | files | file ages | folders |
SHA3-256: |
208f30234a02d33222095cf88103c895 |
User & Date: | olr on 2018-03-29 10:00:48 |
Other Links: | branch diff | manifest | tags |
Context
2018-03-30
| ||
09:37 | [tb] ui to select/deselect personal dictionary check-in: 6c984d1387 user: olr tags: tb, multid | |
2018-03-29
| ||
10:00 | [tb] code cleaning check-in: 208f30234a user: olr tags: tb, multid | |
09:52 | [tb] remove console.log() check-in: 9510e5d68c user: olr tags: tb, multid | |
Changes
Modified gc_lang/fr/tb/content/overlay.js from [3a15f802c4] to [a0e3390e07].
︙ | ︙ | |||
39 40 41 42 43 44 45 | } }; var oGrammarChecker = { // you must use var to be able to call this object from elsewhere xGCEWorker: null, | < | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | } }; var oGrammarChecker = { // you must use var to be able to call this object from elsewhere xGCEWorker: null, loadGC: function () { if (this.xGCEWorker === null) { // Grammar checker echo('Loading Grammalecte'); this.xGCEWorker = new BasePromiseWorker('chrome://promiseworker/content/gce_worker.js'); let that = this; let xPromise = this.xGCEWorker.post('loadGrammarChecker', [prefs.getCharPref("sGCOptions"), "Thunderbird"]); |
︙ | ︙ | |||
346 347 348 349 350 351 352 | let xPromise = this.xGCEWorker.post('suggest', [dErr['sValue'], 10]); xPromise.then( function (sVal) { if (sVal != "") { let lSugg = sVal.split("|"); let n = 0; for (let sSugg of lSugg) { | < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 | let xPromise = this.xGCEWorker.post('suggest', [dErr['sValue'], 10]); xPromise.then( function (sVal) { if (sVal != "") { let lSugg = sVal.split("|"); let n = 0; for (let sSugg of lSugg) { xNodeSuggLine.appendChild(document.createTextNode(" ")); let xNodeSugg = document.createElement("span"); xNodeSugg.setAttribute("class", "sugg"); xNodeSugg.textContent = sSugg; xNodeSugg.addEventListener("click", function (e) { xEditor.changeParagraph(iParagraph, xNodeSugg.textContent, dErr["nStart"], dErr["nEnd"]); xNodeDiv.textContent = ""; that.reparseParagraph(xEditor, iParagraph); }); xNodeSuggLine.appendChild(xNodeSugg); n += 1; } } else { xNodeSuggLine.appendChild(document.createTextNode("Aucune suggestion.")); } }, function (aReason) { console.error('Promise rejected - ', aReason); } ).catch( function (aCaught) { console.error('Promise Error - ', aCaught); } ); }); xNodeSuggLine.appendChild(xNodeSuggButton); xNodeDiv.appendChild(xNodeSuggLine); return xNodeDiv; }, loadUI: function() { echo("loadUI"); |
︙ | ︙ |