js optimizations

This commit is contained in:
Vladimir Mandic
2023-06-05 14:25:57 -04:00
parent c52fb69dde
commit efbe364f7d
30 changed files with 697 additions and 70 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
onUiUpdate(() => {
onAfterUiUpdate(() => {
gradioApp().querySelectorAll('span, button, select, p').forEach((span) => {
tooltip = titles[span.textContent];
if (!tooltip) tooltip = titles[span.value];
@@ -22,7 +22,7 @@ onUiUpdate(() => {
/*
// dump elements
const elements = [
...Array.from(gradioApp().querySelectorAll('button')).map(el => ({id: el.id, text: el.textContent, title: el.title })),
...Array.from(gradioApp().querySelectorAll('label > span')).map(el => ({id: el.id, text: el.textContent, title: el.title })),
...Array.from(gradioApp().querySelectorAll('button')).map(el => ({id: el.id, text: el.textContent, localized: '', hint: el.title })),
...Array.from(gradioApp().querySelectorAll('label > span')).map(el => ({id: el.id, text: el.textContent, localized: '', hint: el.title })),
];
*/