Fix JavaScript conflicts and optimize typewriter effect

- Removed 15+ redundant JavaScript files causing conflicts
- Optimized typewriter-effect.js with smoother animations
- Consolidated hamburger menu implementations
- Cleaned up duplicate inline scripts across all pages
- Enhanced main.js with consolidated scroll effects
- Improved page loading performance by eliminating conflicts
- Fixed lagging/vibrating typewriter effect in hero section
- Updated all HTML pages to use only 4 core JavaScript files
This commit is contained in:
2025-06-01 19:55:04 +05:30
parent 80db64a951
commit 87a3b24eaa
39 changed files with 255 additions and 2025 deletions

View File

@@ -201,47 +201,17 @@
<script src="../js/main.js" defer></script>
<script src="../js/menu-dropdown.js" defer></script>
<script src="js/gn-mobile-navigation.js" defer></script>
<script src="../js/form-subscribe.js" defer></script>
<script src="../js/unified-neural-interactions.js" defer></script>
<script </script>
<script </script>
<script </script>
<script src="../js/tech-marquee.js" defer></script>
<script src="../js/data-node-interactions.js" defer></script>
<script </script>
<!-- Navbar scroll effect script -->
<script>
document.addEventListener('DOMContentLoaded', function() {
const header = document.querySelector('.site-header');
function handleScroll() {
const currentScrollY = window.scrollY;
if (currentScrollY > 30) {
header.classList.add('scrolled');
} else {
header.classList.remove('scrolled');
}
}
// Throttle scroll events for better performance
let ticking = false;
function onScroll() {
if (!ticking) {
requestAnimationFrame(function() {
handleScroll();
ticking = false;
});
ticking = true;
}
}
window.addEventListener('scroll', onScroll, { passive: true });
// Initial check
handleScroll();
});
</script>
</html>