Diniz Martins
May 17, 20221 min
###
๐ฝโ ๏ธ ๐ง๐ต๐ถ๐ ๐๐ฐ๐ฟ๐ถ๐ฝ๐ ๐ถ๐ ๐ท๐๐๐ ๐๐ต๐ฒ ๐๐ผ๐ผ๐น ๐ณ๐ผ๐ฟ ๐ฒ๐ฑ๐๐ฐ๐ฎ๐๐ถ๐ผ๐ป๐ฎ๐น ๐ฎ๐ป๐ฑ ๐๐ฒ๐๐๐ถ๐ป๐ด ๐ฝ๐๐ฟ๐ฝ๐ผ๐๐ฒ๐ โ ๏ธ๐ฝ
###
Descriptions:
This is script for spamming the message from WhatsApp Web;
It can send messages very quickly;
It supports emoji's too.
Usage:
โณ Go to WhatsApp Web;
โณ Open the console (F12);
โณ Console tab;
โณ Paste the code into the console and press ENTER.
async function enviarScript(scriptText){
ย const lines = scriptText.split(/[\n\t]+/).map(line => line.trim()).filter(line => line),
ย main = document.querySelector("#main"),
ย textarea = main.querySelector(`div[contenteditable="true"]`)
ย
ย if(!textarea) throw new Error("Nรฃo hรก uma conversa aberta")
ย
ย for(const line of lines){
ย console.log(line)
ย
ย textarea.textContent = line
ย textarea.dispatchEvent(new InputEvent("input", { bubbles: true }));
ย
ย (main.querySelector(`[data-testid="send"]`) || main.querySelector(`[data-icon="send"]`)).click()
ย
ย if(lines.indexOf(line) !== lines.length - 1) await new Promise(resolve => setTimeout(resolve, 250))
ย }
ย
ย return lines.length
ย }
ย
ย enviarScript(`
ย
ย 0
ย 1
ย 2
ย 3
ย 4
ย 5
ย 6
ย 7
ย 8
ย 9
ย 10
ย
ย
ย `).then(e => console.log(`Cรณdigo finalizado, ${e} mensagens enviadas`)).catch(console.error)
Change the message and have fun.