summaryrefslogtreecommitdiff
path: root/extension.js
blob: 756c75eae7930871ee4d41248a50ba759db470b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const start = () => {
    // if there is no chat
    if (document.querySelector("div[data-a-target=chat-input]") == null) {
        return;
    }
    
    const channelName = getChannelName();
    if (!channelName) {
        return;
    }
    
    getTinyEmotesUserByName("https://alright.party", channelName)
        .then((x) => {
            console.log(x);
        });
};

function onPageReady(cb) {
    if (document.readyState === 'complete' || document.readyState === 'interactive') {
        cb();
    } else {
        document.addEventListener("DOMContentLoaded", db);
    }
}

onPageReady(start);