Spaces:
Running
Running
Download script.js from transformered/secure-sco-shield: direct link, hf CLI and curl.
- Browser
- Download file 965 Bytes
-
https://huggingface.co/spaces/transformered/secure-sco-shield/resolve/df875f6081154537ea06bfa42fb0f8fa5aecf5d3/script.js
- Command line
-
hf download hf://spaces/transformered/secure-sco-shield@df875f6081154537ea06bfa42fb0f8fa5aecf5d3/script.js
-
curl -L -o script.js https://huggingface.co/spaces/transformered/secure-sco-shield/resolve/df875f6081154537ea06bfa42fb0f8fa5aecf5d3/script.js
965 Bytes
| document.addEventListener('DOMContentLoaded', function() { | |
| // Add animations to sections | |
| const sections = document.querySelectorAll('section'); | |
| sections.forEach((section, index) => { | |
| section.classList.add('fade-in'); | |
| section.style.animationDelay = `${index * 0.1}s`; | |
| }); | |
| // Smooth scroll for anchor links | |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
| anchor.addEventListener('click', function(e) { | |
| e.preventDefault(); | |
| document.querySelector(this.getAttribute('href')).scrollIntoView({ | |
| behavior: 'smooth' | |
| }); | |
| }); | |
| }); | |
| // Parallax effect for hero section | |
| const hero = document.querySelector('.hero-section'); | |
| if (hero) { | |
| window.addEventListener('scroll', function() { | |
| const scrollPosition = window.pageYOffset; | |
| hero.style.backgroundPositionY = scrollPosition * 0.5 + 'px'; | |
| }); | |
| } | |
| }); |