// Kaneki Main JavaScript document.addEventListener('DOMContentLoaded', function() { // Auto-dismiss alerts after 5 seconds const alerts = document.querySelectorAll('.alert-dismissible'); alerts.forEach(function(alert) { setTimeout(function() { const bsAlert = bootstrap.Alert.getOrCreateInstance(alert); bsAlert.close(); }, 5000); }); // Add active class to current nav item based on URL const currentPath = window.location.pathname; const navLinks = document.querySelectorAll('.nav-link'); navLinks.forEach(function(link) { if (link.getAttribute('href') === currentPath) { link.classList.add('active'); } }); });