diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-04 08:05:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-04 08:05:21 +0300 |
commit | 56c3f94ba30d76bf680db9bc765624b9a143d769 (patch) | |
tree | 6924fc635fe13fe59911a285313308be2d9acdc7 /javascript/hints.js | |
parent | 952effa8b10dba2f2f7f2cf4191f987e3666e9f0 (diff) | |
parent | 073c0ebba380acbd73be8262feba41212165ff84 (diff) |
Merge branch 'dev' into dev
Diffstat (limited to 'javascript/hints.js')
-rw-r--r-- | javascript/hints.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/javascript/hints.js b/javascript/hints.js index 4167cb28..6de9372e 100644 --- a/javascript/hints.js +++ b/javascript/hints.js @@ -190,3 +190,14 @@ onUiUpdate(function(mutationRecords) { tooltipCheckTimer = setTimeout(processTooltipCheckNodes, 1000); } }); + +onUiLoaded(function() { + for (var comp of window.gradio_config.components) { + if (comp.props.webui_tooltip && comp.props.elem_id) { + var elem = gradioApp().getElementById(comp.props.elem_id); + if (elem) { + elem.title = comp.props.webui_tooltip; + } + } + } +}); |