File size: 723 Bytes
3a1d71c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
(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',
        '๐Ÿ’พ': 'Save preset',
        '๐Ÿ—‘๏ธ': 'Delete preset',
        'โ†ฉ': 'Reset preset',
    };

    onUiUpdate(function () {
        gradioApp().querySelectorAll('.cnet-toolbutton').forEach(function (button) {
            const tooltip = titles[button.textContent];
            if (tooltip && (!button.hasAttribute("title"))) {
                button.title = tooltip;
            }
        })
    });
})();