Download docs/script.js from CompVis/StaDy: direct link, hf CLI and curl.
- Browser
- Download file 968 Bytes
-
https://huggingface.co/CompVis/StaDy/resolve/main/docs/script.js
- Command line
-
hf download hf://CompVis/StaDy/docs/script.js
-
curl -L -o script.js https://huggingface.co/CompVis/StaDy/resolve/main/docs/script.js
968 Bytes
| document.querySelector('#copy-citation').addEventListener('click', async () => { | |
| const status = document.querySelector('#copy-status'); | |
| try { | |
| await navigator.clipboard.writeText(document.querySelector('#citation').textContent); | |
| status.textContent = 'Citation copied.'; | |
| } catch { | |
| const selection = window.getSelection(); | |
| const range = document.createRange(); | |
| range.selectNodeContents(document.querySelector('#citation')); | |
| selection.removeAllRanges(); selection.addRange(range); | |
| status.textContent = 'Citation selected. Press Ctrl+C or ⌘C to copy.'; | |
| } | |
| }); | |
| const relatedWork = document.querySelector('.related-work-flyout'); | |
| document.addEventListener('keydown', event => { | |
| if (event.key === 'Escape' && relatedWork.open) { | |
| relatedWork.open = false; | |
| relatedWork.querySelector('summary').focus(); | |
| } | |
| }); | |
| document.addEventListener('click', event => { | |
| if (!relatedWork.contains(event.target)) relatedWork.open = false; | |
| }); | |