microblog.pub/app/static/common-admin.js

10 lines
359 B
JavaScript
Raw Normal View History

2022-08-29 18:11:31 +00:00
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) => {
return confirm('Do you really want to delete this object?');
});
}
});