div = document.getElementById('messagebuffer');
known = new Set();
sorted = [];
replaceImages = (e) => {
images = e.getElementsByClassName('channel-emote')
for (i of images) {
textnode = document.createTextNode(i.title);
i.parentNode.insertBefore(textnode, i);
}
}
grabMessages = () => {
div.childNodes.forEach((x) => {
if (!known.has(x)) {
replaceImages(x);
known.add(x);
sorted.push(x);
}
});
window.setTimeout(grabMessages, 1000);
}
grabMessages();
dump = () => {
console.log(sorted.map((x) => x.textContent));
}
by Synthbot
by Synthbot
by Synthbot
by Synthbot
by Synthbot