Created
September 24, 2019 10:28
-
-
Save dandyraka/d7a6b7147451d0c10e5d570cd2eab58d to your computer and use it in GitHub Desktop.
Whatsapp Web Spammer for Console
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
function whatsAppText(message) { | |
window.InputEvent = window.Event || window.InputEvent; | |
var event = new InputEvent('input', { | |
bubbles: true | |
}); | |
var textbox = document.getElementsByClassName('_3u328')[0]; | |
textbox.textContent = message; | |
textbox.dispatchEvent(event); | |
document.querySelector('[data-icon="send"]').click(); | |
} | |
function spam(message, loop) { | |
var delay = 1000; // 1 second | |
for (var i = 0; i < loop; i++) { | |
window.setTimeout(function() { | |
whatsAppText(message); | |
}, delay * i); | |
} | |
} | |
//Edit this | |
//Format : (your msg, how many msg u want to send) | |
spam("Your Message", 10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment