Overview
Comment: | [fx] code clarification: use one object dedicated to communication between content-script and background |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | fx |
Files: | files | file ages | folders |
SHA3-256: |
be4cac56bf2b44f37abc13048d7e530e |
User & Date: | olr on 2020-03-13 17:08:14 |
Other Links: | manifest | tags |
Context
2020-03-13
| ||
19:37 | [fx] Grammalecte API: parseNode -> result as JSON check-in: 15fc2e7c11 user: olr tags: trunk, fx | |
17:08 | [fx] code clarification: use one object dedicated to communication between content-script and background check-in: be4cac56bf user: olr tags: trunk, fx | |
2020-03-12
| ||
23:53 | [fr] ajustements check-in: bdd6bc1361 user: olr tags: trunk, fr | |
Changes
Modified gc_lang/fr/webext/content_scripts/init.js from [e10aed13d1] to [6fdc529374].
︙ | |||
168 169 170 171 172 173 174 | 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | - - + - - - | this.oGCPanel.clear(); this.oGCPanel.show(); this.oGCPanel.showEditor(); this.oGCPanel.start(what); this.oGCPanel.startWaitIcon(); if (what && bCheckText) { let sText = this.oGCPanel.oTextControl.getText(); |
︙ | |||
304 305 306 307 308 309 310 | 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 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 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 | + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | autoRefreshOption(); /* Connexion to the background */ const oGrammalecteBackgroundPort = { |
︙ | |||
428 429 430 431 432 433 434 | 523 524 525 526 527 528 529 | - - - - - - - - - - - - - - - - - - - - - - - - | console.log("[Grammalecte] Event: Unknown command", oCommand.sCommand); } } catch (e) { showError(e); } }); |
Modified gc_lang/fr/webext/content_scripts/message_box.js from [1023251c05] to [bb68749e64].
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | - + | // JavaScript // Panel creator /* jshint esversion:6, -W097 */ /* jslint esversion:6 */ |
︙ |
Modified gc_lang/fr/webext/content_scripts/panel.js from [b5c79a2ce5] to [98261d40f5].
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | - + | // JavaScript // Panel creator /* jshint esversion:6, -W097 */ /* jslint esversion:6 */ |
︙ | |||
268 269 270 271 272 273 274 | 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | - - - - + - - - - + - - - - - - - - | hideMessage () { this.xPanelMessageBlock.style.display = "none"; this.xPanelMessageActionButton.style.display = "none"; } executeButtonAction (sActionName) { switch (sActionName) { |
Modified gc_lang/fr/webext/content_scripts/panel_gc.js from [f1590de9e6] to [1cfb37cbb6].
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 | - + - + | // JavaScript /* jshint esversion:6, -W097 */ /* jslint esversion:6 */ |
︙ | |||
107 108 109 110 111 112 113 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | - - - + - - - - - + - - - + | this.setAutoRefreshButton(); } this.xLxgButton.onclick = () => { if (!this.bWorking) { this.showLexicographer(); this.clearLexicographer(); this.startWaitIcon(); |
︙ | |||
168 169 170 171 172 173 174 | 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | - - + - - - | recheckAll () { this.oTooltip.hide(); this.showEditor(); this.clear(); this.startWaitIcon(); this.resetTimer(); |
︙ | |||
284 285 286 287 288 289 290 | 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | - - + - - - | } recheckParagraph (iParaNum) { let sParagraphId = "grammalecte_paragraph" + iParaNum; let xParagraph = this.xParent.getElementById(sParagraphId); this._blockParagraph(xParagraph); let sText = this.purgeText(xParagraph.textContent); |
︙ | |||
636 637 638 639 640 641 642 | 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 | - + - - - - | updateConj (bStart=false) { let bPro = this.xParent.getElementById('grammalecte_conj_opro').checked; let bNeg = this.xParent.getElementById('grammalecte_conj_oneg').checked; let bTpsCo = this.xParent.getElementById('grammalecte_conj_otco').checked; let bInt = this.xParent.getElementById('grammalecte_conj_oint').checked; let bFem = this.xParent.getElementById('grammalecte_conj_ofem').checked; if (this.sVerb) { |
︙ | |||
872 873 874 875 876 877 878 | 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 | - - - - + - | this.xParent.getElementById("grammalecte_tooltip_db_search").style.display = "inline"; this.xParent.getElementById("grammalecte_tooltip_db_search").dataset.url = "https://grammalecte.net/dictionary.php?prj=fr&lemma="+xNodeErr.textContent; } else { this.xParent.getElementById("grammalecte_tooltip_db_search").style.display = "none"; } this.clearSuggestionBlock(); this.xTooltipSuggBlock.textContent = "Recherche de graphies possibles…"; |
︙ | |||
962 963 964 965 966 967 968 | 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 | - + - + - + - + - + | this.clear(); this.xNode = xNode; this.bResultInEvent = Boolean(xNode.dataset.grammalecte_result_via_event && xNode.dataset.grammalecte_result_via_event == "true"); this.bTextArea = (xNode.tagName == "TEXTAREA" || xNode.tagName == "INPUT"); this.bIframe = (xNode.tagName == "IFRAME"); if (this.bTextArea) { this.xNode.disabled = true; |
︙ |