So, in short: I would like to create a bookmarklet which fills the chatbox with text (channel emotes in this case. If a user subscribes I want to click the bookmarklet to automatically put some ‘sub hype’ emotes into the chatbox).
Here’s what I tried:
I got a reference to the chatbox using queryselector, then just changed the value to “test”.
This works, but the chat button is disabled, making me think that the textbox needs to fire some event.
I tried the dispatchEvent function with various events like ‘change’ or ‘keydown’, I tried to call the ‘focus’ function of the textbox. No luck. As far as I saw the chat-button does not have an ‘enabled’ property.
So, does anyone know what I am missing? What do I need to learn to properly understand this? Is this even possible from the client side?
Thanks for any input!