From 6a62b79a126e573ae51b076de5f7ef0e04980c8b Mon Sep 17 00:00:00 2001 From: Corentin Date: Tue, 15 Nov 2022 17:43:30 +0900 Subject: [PATCH] Fix clipboard copy --- .gitignore | 2 ++ manifest.json | 2 +- popup.js | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 54b71dd..8234428 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ *.xpi +*.zip +*.png .web-extension-id \ No newline at end of file diff --git a/manifest.json b/manifest.json index 5f6b16e..a8fecf2 100644 --- a/manifest.json +++ b/manifest.json @@ -20,5 +20,5 @@ "storage", "clipboardWrite" ], - "version": "1.0" + "version": "1.1" } \ No newline at end of file diff --git a/popup.js b/popup.js index 38f9c1d..2429675 100644 --- a/popup.js +++ b/popup.js @@ -223,7 +223,7 @@ class Entry let otp_elt = document.createElement('div') otp_elt.className = 'otp' otp_elt.addEventListener('click', () => { - navigator.clipboard.writeText(this.signature) + navigator.clipboard.writeText(otp_elt.textContent) }) new_elt.appendChild(otp_elt)