v1.0.0: Admin JS utilities
This commit is contained in:
@@ -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(); });
|
||||
});
|
||||
Reference in New Issue
Block a user