aboutsummaryrefslogtreecommitdiffstats
path: root/src/assets
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2022-06-10 20:00:12 +0300
committerManeraKai <manerakai@protonmail.com>2022-06-10 20:00:12 +0300
commit61f23903238e169498fe059593ef26ba73a3ecb4 (patch)
tree19e6827c6937ea4ac3a47cb5bc7190a3608985a5 /src/assets
parentFixed search removing symbols #321 (diff)
downloadlibredirect-61f23903238e169498fe059593ef26ba73a3ecb4.zip
Fixed Copy Raw shortcut not working #324
Diffstat (limited to 'src/assets')
-rw-r--r--src/assets/javascripts/utils.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/assets/javascripts/utils.js b/src/assets/javascripts/utils.js
index 4a665bc4..65bc67d0 100644
--- a/src/assets/javascripts/utils.js
+++ b/src/assets/javascripts/utils.js
@@ -374,18 +374,15 @@ function copyRaw(test, copyRawElement) {
if (!newUrl) newUrl = await imgurHelper.reverse(url);
if (newUrl) {
- resolve(true);
+ resolve(newUrl);
if (test) return;
navigator.clipboard.writeText(newUrl);
- console.log('newUrl', newUrl)
if (copyRawElement) {
- console.log('working')
const textElement = copyRawElement.getElementsByTagName('h4')[0]
const oldHtml = textElement.innerHTML;
textElement.innerHTML = browser.i18n.getMessage('copied');
setTimeout(() => textElement.innerHTML = oldHtml, 1000);
}
- console.log('finished')
}
}
resolve()