onUiUpdate(function () { | |
// mouseover tooltips for various UI elements | |
const titles = { | |
'π': 'Refresh', | |
'\u2934': 'Send dimensions to stable diffusion', | |
'π₯': 'Run preprocessor', | |
'π': 'Open new canvas', | |
'π·': 'Enable webcam', | |
'β': 'Mirror webcam', | |
}; | |
gradioApp().querySelectorAll('.cnet-toolbutton').forEach(function (button) { | |
const tooltip = titles[button.textContent]; | |
if (tooltip) { | |
button.title = tooltip; | |
} | |
}) | |
}); |