Skip to content

Commit

Permalink
updates and bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lreiner committed Jul 29, 2018
1 parent d1a13c8 commit 98a183b
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Tampermonkey-Executable/wmb_tampermonkey.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
// ==UserScript==
// @name Whatsapp Message Bot
// @namespace https://github.com/reinerluke/Whatsapp-Message-Spammer/
// @version 3.0
// @version 4.0
// @description Made by reinerluke
// @author reinerluke
// @match https://web.whatsapp.com/
// @grant none
// @icon https://k60.kn3.net/58A8A056B.png
// @icon64 https://k60.kn3.net/58A8A056B.png
// ==/UserScript==

var allElementsClassName = "m6ZEb";
var buttonSendClass = "._35EW6";
var inputMessageClassName = "_2S1VP";

var timer = setInterval(general, 1000);

function general() {
if (document.getElementsByClassName("m6ZEb")[0] != null) {
if (document.getElementsByClassName(allElementsClassName)[0] != null) {
console.log("WS Spam: Found Div to inject ...");
var item = document.getElementsByClassName("m6ZEb")[0];
var item = document.getElementsByClassName(allElementsClassName)[0];
var element = item.cloneNode(true);
element.innerHTML = '<div style="height: 110px; width: 100%;"> \
<input type="text" id="inputMessage" placeholder="Message ..." style="margin-left: 10px; margin-top: 10px; width: calc(100% - 50px); height: 30px; padding-left: 10px"> \
Expand Down Expand Up @@ -50,13 +55,13 @@ function dispatch(input, message) {
});
input.innerHTML = message;
input.dispatchEvent(evt);
document.querySelector("._2lkdt").click();
document.querySelector(buttonSendClass).click();
}

function spam() {
var text = document.getElementById("inputMessage").value;
var reps = document.getElementById("timesSend").value;
var input = document.getElementsByClassName("_2S1VP copyable-text selectable-text")[0];
var input = document.getElementsByClassName(inputMessageClassName + " copyable-text selectable-text")[0];
var counter = 1;
while (counter <= reps) {
dispatch(input, text);
Expand Down

0 comments on commit 98a183b

Please sign in to comment.