Grammalecte  Check-in [a6007f74a3]

Overview
Comment:[fx] gc panel: clipboard fallback when failed
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fx
Files: files | file ages | folders
SHA3-256: a6007f74a32a8e169024ee0842ee1d072fdf1c5655bfe1572aba919716ff5684
User & Date: olr on 2020-09-10 19:06:48
Other Links: manifest | tags
Context
2020-09-10
19:25
[graphspell] spellchecker: missing docstrings check-in: c35d85a03b user: olr tags: trunk, graphspell
19:06
[fx] gc panel: clipboard fallback when failed check-in: a6007f74a3 user: olr tags: trunk, fx
18:15
[fr] ajustements check-in: 6a6ad52cca user: olr tags: trunk, fr
Changes

Modified gc_lang/fr/webext/content_scripts/panel_gc.js from [6fa57d1aea] to [988b1eccad].

509
510
511
512
513
514
515
516

517
518
519
520
521
522
523
509
510
511
512
513
514
515

516
517
518
519
520
521
522
523







-
+







            // Firefox 63+, Chrome 66+
            // Working draft: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard
            navigator.clipboard.writeText(sText)
            .then(
                (res) => { window.setTimeout(() => { this.xClipboardButton.textContent = "📋"; }, 2000); }
            )
            .catch(
                (e) => { showError(e); this._sendTextToClipboard(sText); }
                (e) => { showError(e); this._sendTextToClipboardFallback(sText); }
            );
        } else {
            this._sendTextToClipboardFallback(sText);
        }
    }

    _sendTextToClipboardFallback (sText) {