summaryrefslogtreecommitdiff
path: root/extension.js
blob: f910541f8e30a9625f126a273a5bcfb3a2982937 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const start = () => {
    // if there is no chat
    if (document.querySelector("div[data-a-target=chat-input]") == null) {
        return;
    }
    console.log(getChannelName());
};

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

onPageReady(start);