Last active
August 29, 2015 14:19
-
-
Save Prithvirajbilla/aa1f80ab08f4c4cf991c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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