Flatlogic Bot 76b627d181 1.0
2025-10-11 10:54:51 +00:00

26 lines
911 B
JavaScript

// CrownEd Custom Scripts
document.addEventListener('DOMContentLoaded', function() {
const notification = document.getElementById('notification');
if (notification) {
// Show the notification if it exists
if (notification.textContent.trim().length > 0) {
notification.style.display = 'block';
setTimeout(() => {
notification.style.display = 'none';
}, 5000); // Hide after 5 seconds
}
}
// Smooth scrolling for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
if (this.getAttribute('href').length > 1) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
}
});
});
});