Spaces:
Running
Running
Download script.js from HM1234/kdp-magic-maker-pro: direct link, hf CLI and curl.
- Browser
- Download file 865 Bytes
-
https://huggingface.co/spaces/HM1234/kdp-magic-maker-pro/resolve/main/script.js
- Command line
-
hf download hf://spaces/HM1234/kdp-magic-maker-pro/script.js
-
curl -L -o script.js https://huggingface.co/spaces/HM1234/kdp-magic-maker-pro/resolve/main/script.js
865 Bytes
| // Shared functionality across all pages | |
| // Initialize tooltips for feather icons | |
| document.addEventListener('DOMContentLoaded', function() { | |
| const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')) | |
| tooltipTriggerList.map(function (tooltipTriggerEl) { | |
| return new bootstrap.Tooltip(tooltipTriggerEl) | |
| }); | |
| }); | |
| // 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' | |
| }); | |
| }); | |
| }); | |
| // Feature detection for modern browser features | |
| if (!('IntersectionObserver' in window)) { | |
| // Load polyfill or provide fallback | |
| console.log('IntersectionObserver not supported'); | |
| } |