mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 13:14:28 +00:00
11 lines
397 B
JavaScript
11 lines
397 B
JavaScript
document.addEventListener('DOMContentLoaded', (ev) => {
|
|
// Add confirm to "delete" button next to outbox objects
|
|
var forms = document.getElementsByClassName("object-delete-form")
|
|
for (var i = 0; i < forms.length; i++) {
|
|
forms[i].addEventListener('submit', (ev) => {
|
|
if (!confirm('Do you really want to delete this object?')) {
|
|
ev.preventDefault();
|
|
};
|
|
});
|
|
}
|
|
});
|