Spaces:
Runtime error
Runtime error
Download javascript/uiConfig.js from bilegentile/test: direct link, hf CLI and curl.
- Browser
- Download file 846 Bytes
-
https://huggingface.co/spaces/bilegentile/test/resolve/refs%2Fpr%2F3/javascript/uiConfig.js
- Command line
-
hf download hf://spaces/bilegentile/test@refs/pr/3/javascript/uiConfig.js
-
curl -L -o uiConfig.js https://huggingface.co/spaces/bilegentile/test/resolve/refs%2Fpr%2F3/javascript/uiConfig.js
846 Bytes
| function uiOpenSubmenus() { | |
| const accordions = Array.from(gradioApp().querySelectorAll('.gradio-accordion')); | |
| const states = {}; | |
| accordions.forEach((el) => { | |
| const name = el.querySelector('.label-wrap > span:not(.icon)').innerText.trim(); | |
| const children = Array.from(el.childNodes); | |
| const open = children.filter((c) => c.style?.display === 'block'); | |
| if (states[name] === undefined) states[name] = open.length > 0; | |
| }); | |
| return states; | |
| } | |
| function getUIDefaults() { | |
| const btn = gradioApp().getElementById('ui_defaults_view'); | |
| if (!btn) return; | |
| const intersectionObserver = new IntersectionObserver((entries) => { | |
| if (entries[0].intersectionRatio <= 0) { } | |
| if (entries[0].intersectionRatio > 0) btn.click(); | |
| }); | |
| intersectionObserver.observe(btn); // monitor visibility of tab | |
| } | |
| onUiLoaded(getUIDefaults); | |