Download script.js from Prochu/peecvision-ai-search-intelligence-platform: direct link, hf CLI and curl.
- Browser
- Download file 1.82 kB
-
https://huggingface.co/spaces/Prochu/peecvision-ai-search-intelligence-platform/resolve/main/script.js
- Command line
-
hf download hf://spaces/Prochu/peecvision-ai-search-intelligence-platform/script.js
-
curl -L -o script.js https://huggingface.co/spaces/Prochu/peecvision-ai-search-intelligence-platform/resolve/main/script.js
1.82 kB
| // Shared JavaScript across all pages | |
| console.log('Peec AI Platform loaded'); | |
| // Initialize animations and interactions | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Add intersection observer for scroll animations | |
| const observerOptions = { | |
| threshold: 0.1, | |
| rootMargin: '0px 0px -50px 0px' | |
| }); | |
| // Handle smooth scrolling for anchor links | |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
| anchor.addEventListener('click', function (e) { | |
| e.preventDefault(); | |
| const target = document.querySelector(this.getAttribute('href')); | |
| if (target) { | |
| target.scrollIntoView({ | |
| behavior: 'smooth', | |
| block: 'start' | |
| }); | |
| } | |
| }); | |
| }); | |
| // Add loading states to buttons | |
| document.querySelectorAll('a[href*="app.peec.ai"]').forEach(button => { | |
| button.addEventListener('click', function() { | |
| this.classList.add('loading'); | |
| setTimeout(() => { | |
| this.classList.remove('loading'); | |
| }, 2000); | |
| }); | |
| }); | |
| } | |
| // Handle mobile menu toggle | |
| function initMobileMenu() { | |
| const mobileMenuButton = document.querySelector('[data-mobile-menu-button]'); | |
| const mobileMenu = document.querySelector('[data-mobile-menu]'); | |
| if (mobileMenuButton && mobileMenu) { | |
| mobileMenuButton.addEventListener('click', function() { | |
| mobileMenu.classList.toggle('hidden'); | |
| }); | |
| } | |
| } | |
| initMobileMenu(); | |
| // Performance monitoring | |
| window.addEventListener('load', function() { | |
| const loadTime = performance.timing.loadEventEnd - performance.timing.navigationStart; | |
| console.log(`Page loaded in ${loadTime}ms`); | |
| }); |