Skip to content

Instantly share code, notes, and snippets.

@ronivaldo
Created November 12, 2021 00:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ronivaldo/7091672fba0541e6ce205c42801ca8ea to your computer and use it in GitHub Desktop.
Save ronivaldo/7091672fba0541e6ce205c42801ca8ea to your computer and use it in GitHub Desktop.
var message = prompt("Enter the message");
var count = prompt("Enter the Number of times"); // Change the Number to change
var looper = 0;
for(looper=0;looper<count;looper++)
{
window.InputEvent = window.Event || window.InputEvent;
var d = new Date();
var event = new InputEvent('input', {bubbles: true});
var textbox= document.querySelector('#main > footer > div._2BU3P.tm2tP.copyable-area > div > span:nth-child(2) > div > div._2lMWa > div.p3_M1 > div > div._13NKt.copyable-text.selectable-text');
textbox.textContent = message;
textbox.dispatchEvent(event);
var b = document.querySelectorAll('#main > footer > div._2BU3P.tm2tP.copyable-area > div > span:nth-child(2) > div > div._2lMWa > div._3HQNh._1Ae7k > button')[0]
b.click();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment