Add text and emotes to chat textbox

Hi,
I’m trying to create a content script that allows me to add predefined content quickly to chat textbox.

Here is my code for the moment:


img.addEventListener('click', function() {
    const textBox = document.querySelector('div[role="textbox"]');
    const currentText = textBox.textContent.trim();
    textBox.textContent = currentText ? currentText + ' ' + emote.name : emote.name;
});

but the problem is that the text seems not to be a the right place as you can see:

Does anyone know how to do it the right way ? as 7TV does it

Modification of the first party site isn’t documented, and is entirely at your own risk and for you to work with should you attempt to modify it.

If you wish to know how 7TV does it I suggest reaching out to them.

Thanks for your time and your reply :pray:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.