diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-11-05 16:32:15 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-11-05 16:49:00 +0100 |
commit | 5f987a64d88e0c1bb0da8bde9050e3409879cbda (patch) | |
tree | 355f1b7591c272d88f3a7b86c8a4d3d001aebba9 /assets/default/js | |
parent | 8bbf57a2d0dfe8d8d6416a26f9ff1177c77e806b (diff) | |
download | Shaarli-5f987a64d88e0c1bb0da8bde9050e3409879cbda.tar.gz Shaarli-5f987a64d88e0c1bb0da8bde9050e3409879cbda.tar.zst Shaarli-5f987a64d88e0c1bb0da8bde9050e3409879cbda.zip |
Fix confirm popup before bookmark deletion
Regression introduced by #1596
Fixes #1623
Diffstat (limited to 'assets/default/js')
-rw-r--r-- | assets/default/js/base.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/assets/default/js/base.js b/assets/default/js/base.js index 4163577d..66badfb2 100644 --- a/assets/default/js/base.js +++ b/assets/default/js/base.js | |||
@@ -294,7 +294,8 @@ function init(description) { | |||
294 | const deleteLinks = document.querySelectorAll('.confirm-delete'); | 294 | const deleteLinks = document.querySelectorAll('.confirm-delete'); |
295 | [...deleteLinks].forEach((deleteLink) => { | 295 | [...deleteLinks].forEach((deleteLink) => { |
296 | deleteLink.addEventListener('click', (event) => { | 296 | deleteLink.addEventListener('click', (event) => { |
297 | if (!confirm(document.getElementById('translation-delete-tag').innerHTML)) { | 297 | const type = event.currentTarget.getAttribute('data-type') || 'link'; |
298 | if (!confirm(document.getElementById(`translation-delete-${type}`).innerHTML)) { | ||
298 | event.preventDefault(); | 299 | event.preventDefault(); |
299 | } | 300 | } |
300 | }); | 301 | }); |