Download script.js from Deste12/telemaster-streambox-pro: direct link, hf CLI and curl.
- Browser
- Download file 1.43 kB
-
https://huggingface.co/spaces/Deste12/telemaster-streambox-pro/resolve/main/script.js
- Command line
-
hf download hf://spaces/Deste12/telemaster-streambox-pro/script.js
-
curl -L -o script.js https://huggingface.co/spaces/Deste12/telemaster-streambox-pro/resolve/main/script.js
1.43 kB
| // Main application script | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Initialize tooltips | |
| const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')); | |
| // Channel favoriting functionality | |
| document.querySelectorAll('.favorite-btn').forEach(btn => { | |
| btn.addEventListener('click', function(e) { | |
| e.preventDefault(); | |
| e.stopPropagation(); | |
| const icon = this.querySelector('i'); | |
| if (icon.getAttribute('data-feather') === 'heart') { | |
| icon.setAttribute('data-feather', 'heart'); | |
| feather.replace(); | |
| this.classList.remove('text-gray-400'); | |
| this.classList.add('text-red-500'); | |
| } else { | |
| icon.setAttribute('data-feather', 'heart'); | |
| feather.replace(); | |
| this.classList.remove('text-red-500'); | |
| this.classList.add('text-gray-400'); | |
| } | |
| }); | |
| }); | |
| // Mobile menu toggle (handled in navbar component) | |
| // Simulate loading popular channels | |
| async function loadPopularChannels() { | |
| try { | |
| // In a real app, this would fetch from your API | |
| console.log('Loading popular channels...'); | |
| } catch (error) { | |
| console.error('Error loading channels:', error); | |
| } | |
| } | |
| loadPopularChannels(); | |
| }); |