Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// With little creativity and some coding skills you can do a lot of things using this code to annoy some one.
// works on the first chat box opened. only works in google chrome!
function dispatch(target) {
var evt = document.createEvent("Event");
evt.initEvent("keydown",true,true);
evt.keyCode = 13;
evt.which = 13;
target.dispatchEvent(evt);
}
// "#PeaceYo" is the message
// 1000 is the milli seconds interval. right now it is 1sec.
window.setInterval(function(){
document.getElementsByClassName("uiTextareaAutogrow _552m")[0].value = "#PeaceYo"
dispatch(document.getElementsByClassName("uiTextareaAutogrow _552m")[0]);
}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment