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

12 lines
397 B
JavaScript
Raw Normal View History

2022-08-29 13:11:31 -05: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) => {
2022-08-30 12:09:51 -05:00
if (!confirm('Do you really want to delete this object?')) {
ev.preventDefault();
};
2022-08-29 13:11:31 -05:00
});
}
});