Fix confirm popup before bookmark deletion
Regression introduced by #1596 Fixes #1623
This commit is contained in:
parent
8bbf57a2d0
commit
5f987a64d8
4 changed files with 20 additions and 12 deletions
assets/default/js
|
@ -294,7 +294,8 @@ function init(description) {
|
|||
const deleteLinks = document.querySelectorAll('.confirm-delete');
|
||||
[...deleteLinks].forEach((deleteLink) => {
|
||||
deleteLink.addEventListener('click', (event) => {
|
||||
if (!confirm(document.getElementById('translation-delete-tag').innerHTML)) {
|
||||
const type = event.currentTarget.getAttribute('data-type') || 'link';
|
||||
if (!confirm(document.getElementById(`translation-delete-${type}`).innerHTML)) {
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue