Last active
June 9, 2017 17:15
-
-
Save meain/dc36b6dd6e4ce873535aed460c40878a to your computer and use it in GitHub Desktop.
Whatsapp web spam script
This file contains 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
// for send function to select input | |
function dispatch(target, eventType, char) { | |
var evt = document.createEvent("TextEvent"); | |
evt.initTextEvent (eventType, true, true, window, char, 0, "en-US"); | |
target.focus(); | |
target.dispatchEvent(evt); | |
} | |
// enters input and clicks button | |
function send(msg){ | |
a=document.getElementsByClassName('input')[1]; | |
dispatch(a,"textInput",msg); | |
document.getElementsByClassName('icon-send')[0].click(); | |
} | |
var myVar = setInterval(myTimer, 5000); //5 second interval | |
function myTimer() { | |
send("Weee!"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It dosent work, It depends on the user on what does he type