mirror of
https://github.com/vladmandic/automatic
synced 2026-09-12 07:58:43 +02:00
cleanup api model defs
This commit is contained in:
@@ -29,8 +29,10 @@ async function setupControlUI() {
|
||||
const intersectionObserver = new IntersectionObserver((entries) => {
|
||||
if (entries[0].intersectionRatio > 0) {
|
||||
const tab = gradioApp().querySelector('#control-tabs > .tab-nav > .selected')?.innerText.toLowerCase() || ''; // selected tab name
|
||||
const btn = gradioApp().getElementById(`refresh_${tab}_models`);
|
||||
if (btn) btn.click();
|
||||
for (let i = 0; i < 10; i += 1) {
|
||||
const btn = gradioApp().getElementById(`refresh_${tab}_models_${i}`);
|
||||
if (btn) btn.click();
|
||||
}
|
||||
}
|
||||
});
|
||||
intersectionObserver.observe(el); // monitor visibility of tab
|
||||
|
||||
Reference in New Issue
Block a user