Download script.js from dewmetime/caption-wizard-trigger-words: direct link, hf CLI and curl.
- Browser
- Download file 648 Bytes
-
https://huggingface.co/spaces/dewmetime/caption-wizard-trigger-words/resolve/main/script.js
- Command line
-
hf download hf://spaces/dewmetime/caption-wizard-trigger-words/script.js
-
curl -L -o script.js https://huggingface.co/spaces/dewmetime/caption-wizard-trigger-words/resolve/main/script.js
648 Bytes
| // Shared JavaScript across all pages | |
| document.addEventListener('DOMContentLoaded', () => { | |
| // Ensure Feather icons are properly replaced in Web Components | |
| const replaceIconsInShadowRoot = () => { | |
| document.querySelectorAll('*').forEach(element => { | |
| if (element.shadowRoot) { | |
| feather.replace({}, element.shadowRoot); | |
| } | |
| }); | |
| }; | |
| // Replace icons initially | |
| replaceIconsInShadowRoot(); | |
| // Replace icons again after a short delay to ensure Web Components are loaded | |
| setTimeout(replaceIconsInShadowRoot, 100); | |
| setTimeout(replaceIconsInShadowRoot, 500); | |
| }); | |