Index: gc_lang/fr/webext/content_scripts/panel_gc.js ================================================================== --- gc_lang/fr/webext/content_scripts/panel_gc.js +++ gc_lang/fr/webext/content_scripts/panel_gc.js @@ -430,11 +430,11 @@ this.stopWaitIcon(); } _sendTextToClipboard (sText) { this.xClipboardButton.textContent = "⇒ presse-papiers"; - if (navigator.hasOwnProperty("clipboard") && navigator.clipboard.hasOwnProperty("writeText")) { + if (navigator.clipboard && navigator.clipboard.writeText) { // 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); } @@ -447,10 +447,11 @@ } } _sendTextToClipboardFallback (sText) { try { + console.log("send text to clipboard fallback"); // Copy to clipboard fallback // recipe from https://github.com/mdn/webextensions-examples/blob/master/context-menu-copy-link-with-types/clipboard-helper.js function setClipboardData (xEvent) { document.removeEventListener("copy", setClipboardData, true); xEvent.stopImmediatePropagation();