You are on page 1of 5

Var repeatingSpamFunction = null;

Var message = ‘’;

Function getElementByXpath(path) {

Return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE,


null).singleNodeValue;

Document.onclick = function(){

createSpamButton();

};

Function createSpamButton () {

If(document.getElementById(‘spamButton’) != null)

Return;

Var composeBar = getElementByXpath(“//*[@id=\”main\”]/footer/div[1]”);

If(composeBar == null)

Return;
composeBar.oninput = function(){

editSpamButton();

};

Var spamButton = document.createElement(‘button’);

spamButton.setAttribute(“id”, “spamButton”);

spamButton.innerHTML = ‘GAS SPAM’;

spamButton.style.fontSize = ‘100%’;

spamButton.style.padding = ‘0px 0px 10px 10px’;

composeBar.append(spamButton);

editSpamButton();

Function sendMessage () {

Var evt = new Event(‘input’, {

Bubbles: true
});

Var input = getElementByXpath(“//*[@id=\”main\”]/footer/div[1]/div[2]/div/div[2]”);

Input.innerHTML = message;

Input.dispatchEvent(evt);

getElementByXpath(“//*[@id=\”main\”]/footer/div[1]/div[3]/button”).click();

Function doSpam(element) {

If(element.innerHTML == ‘GAS SPAM’){

Var input = getElementByXpath(“//*[@id=\”main\”]/footer/div[1]/div[2]/div/div[2]”);

If(input.innerHTML == ‘’ || input.innerHTML == null){

Window.alert(‘iseng banget sih spam ke orang.’);

Return;

Element.innerHTML = ‘Berhenti atuh’;


Message = input.innerHTML;

Var interval = parseInt ();

Window.alert(‘iseng banget sih spam ke orang. Jangan Lupa pencet tombol berhenti dibawah,
kasian orang nya wkwk’);

repeatingSpamFunction = window.setInterval(function(){

sendMessage();

}, interval);

} else {

Element.innerHTML = ‘GAS SPAM’;

Window.clearInterval(repeatingSpamFunction);

editSpamButton();

Function editSpamButton(){

Var spamButton = document.getElementById(‘spamButton’);


Var input = getElementByXpath(“//*[@id=\”main\”]/footer/div[1]/div[2]/div/div[2]”);

If(input.innerHTML == ‘’ || input.innerHTML == null){

spamButton.style.cursor = ‘not-allowed’;

spamButton.style.color = ‘#D3D3D3’;

spamButton.onclick = null;

} else {

spamButton.style.cursor = ‘pointer’;

spamButton.style.color = ‘#039be5’;

spamButton.onclick = function(){

doSpam(this);

};

You might also like