Spaces:
Running
Running
Download script.js from kevenb00s/streamflix: direct link, hf CLI and curl.
- Browser
- Download file 1.51 kB
-
https://huggingface.co/spaces/kevenb00s/streamflix/resolve/main/script.js
- Command line
-
hf download hf://spaces/kevenb00s/streamflix/script.js
-
curl -L -o script.js https://huggingface.co/spaces/kevenb00s/streamflix/resolve/main/script.js
1.51 kB
| // Initialize Feather Icons | |
| document.addEventListener('DOMContentLoaded', function() { | |
| feather.replace(); | |
| }); | |
| // Video card hover effect enhancement | |
| document.querySelectorAll('.video-card').forEach(card => { | |
| card.addEventListener('mouseenter', function() { | |
| this.style.transform = 'translateY(-5px)'; | |
| }); | |
| card.addEventListener('mouseleave', function() { | |
| this.style.transform = 'translateY(0)'; | |
| }); | |
| }); | |
| // Search functionality | |
| const searchInput = document.getElementById('search-input'); | |
| if (searchInput) { | |
| searchInput.addEventListener('keyup', function(e) { | |
| if (e.key === 'Enter') { | |
| const query = this.value.trim(); | |
| if (query) { | |
| alert(`Searching for: ${query}`); | |
| // In a real app, this would redirect to search results page | |
| } | |
| } | |
| }); | |
| } | |
| // Theme toggle functionality | |
| const themeToggle = document.getElementById('theme-toggle'); | |
| if (themeToggle) { | |
| themeToggle.addEventListener('click', function() { | |
| document.body.classList.toggle('dark-mode'); | |
| // Save preference to localStorage | |
| const isDark = document.body.classList.contains('dark-mode'); | |
| localStorage.setItem('theme', isDark ? 'dark' : 'light'); | |
| }); | |
| } | |
| // Load saved theme preference | |
| document.addEventListener('DOMContentLoaded', function() { | |
| const savedTheme = localStorage.getItem('theme'); | |
| if (savedTheme === 'dark') { | |
| document.body.classList.add('dark-mode'); | |
| } | |
| }); |