v1.0.0: Admin JS utilities

This commit is contained in:
2026-05-21 08:55:52 +10:00
parent 98034fccd5
commit 37d58b2b30
+7
View File
@@ -0,0 +1,7 @@
// === Scratching Post Admin JS ===
document.querySelectorAll('.alert-dismissible').forEach(function (alert) {
setTimeout(function () { var bsAlert = bootstrap.Alert.getOrCreateInstance(alert); bsAlert.close(); }, 5000);
});
document.querySelectorAll('[data-confirm]').forEach(function (el) {
el.addEventListener('click', function (e) { if (!confirm(this.dataset.confirm)) e.preventDefault(); });
});