Spaces:
Running
Running
Download script.js from madstuntman11/helloworldapp: direct link, hf CLI and curl.
- Browser
- Download file 924 Bytes
-
https://huggingface.co/spaces/madstuntman11/helloworldapp/resolve/main/script.js
- Command line
-
hf download hf://spaces/madstuntman11/helloworldapp/script.js
-
curl -L -o script.js https://huggingface.co/spaces/madstuntman11/helloworldapp/resolve/main/script.js
924 Bytes
| // Main application script | |
| console.log('HelloWorldApp loaded successfully! ๐'); | |
| // Simple animation for the main container | |
| document.addEventListener('DOMContentLoaded', () => { | |
| const mainContainer = document.querySelector('main'); | |
| if (mainContainer) { | |
| mainContainer.style.opacity = '0'; | |
| mainContainer.style.transform = 'translateY(20px)'; | |
| setTimeout(() => { | |
| mainContainer.style.transition = 'opacity 0.5s ease, transform 0.5s ease'; | |
| mainContainer.style.opacity = '1'; | |
| mainContainer.style.transform = 'translateY(0)'; | |
| }, 100); | |
| } | |
| }); | |
| // Service worker registration for PWA support | |
| if ('serviceWorker' in navigator) { | |
| window.addEventListener('load', () => { | |
| navigator.serviceWorker.register('/sw.js') | |
| .then(registration => console.log('ServiceWorker registered successfully')) | |
| .catch(error => console.log('ServiceWorker registration failed:', error)); | |
| }); | |
| } |