text: var SELECTOR_WHATSAPP_MESSAGE_CONTAINER="._13NKt",SELECTOR_WHATSAPP_SEND_BUTTON="._4sWnG",SELECTOR_WHATSAPP_MAIN_CONTAINER="#app";function createForm(){let e=document.querySelector(SELECTOR_WHATSAPP_MAIN_CONTAINER),n=document.createElement("style");n.type="text/css",n.innerHTML='\n\t  .hide-me {\n      display: none !important;\n    }\n\t .form-box {\n      color: silver;\n      width: 50%;\n      border: 1px solid gray;\n      position: absolute;\n      top: 10%;\n      left: 30%;\n      background-color: #404040;\n      z-index: 2000;\n      display: flex;\n      flex-direction: row;\n      flex-wrap: wrap;\n      justify-content: center;\n    }\n\t .text-input {\n\t    display: block;\n\t    width: 80%;\n\t    padding: .5rem;\n\t    margin: .5rem;\n\t    margin-bottom: 1rem;\n\t    border: none;\n\t    border-bottom: 1px solid silver;\n\t    color: silver;\n\t    background-color: #404040;\n    }\n    .spam-btns {\n      display: block;\n      width: 75%;\n      padding: 1rem;\n      margin: .5rem;\n      margin-bottom: 1rem;\n      border-radius: 1.625rem;\n      color: #ffffff;\n      background-color: #282936;\n      font-size: 1.1rem;\n      border: 2px solid silver;\n    }\n    .spam-btns:hover {\n      background-color: silver;\n      color: black;\n      font-weight: 600;\n    }\n    .radio-input-wrapper {\n\t    color: silver;\n\t    padding: 5px;\n\t    margin: 5px;\n    }\n    .delete {\n      margin-top: 5px;\n      margin-right: -3px;\n      -webkit-appearance: none;\n      background-color: #16c72e;\n      border: none;\n      border-radius: 290486px;\n      cursor: pointer;\n      pointer-events: auto;\n      display: inline-block;\n      flex-grow: 0;\n      flex-shrink: 0;\n      font-size: 0;\n      height: 20px;\n      max-height: 20px;\n      max-width: 20px;\n      min-height: 20px;\n      min-width: 20px;\n      outline: 0;\n      position: relative;\n      vertical-align: top;\n      width: 20px;\n    }\n    .delete::before {\n      height: 2px;\n      width: 50%;\n    }\n    .delete::after {\n      height: 50%;\n      width: 2px;\n    }\n    .delete::after, .delete::before {\n      background-color: #fff;\n      content: "";\n      display: block;\n      left: 50%;\n      position: absolute;\n      top: 50%;\n      transform: translateX(-50%) translateY(-50%) rotate(45deg);\n      transform-origin: center center;\n    }\n    .X { position: absolute !important;\n      margin: 5px;\n      top: 0;\n      right: 0;\n      color: yellow;\n      text-decoration: none;\n    }\n    .text-center {\n      text-align: center;\n    }\n    .ml-4 {\n      margin-left: 1rem;\n    }\n    .mr-4 {\n      margin-right: 1rem;\n    }\n    ',document.getElementsByTagName("head")[0].appendChild(n);let t=document.createElement("form");t.id="form",t.classList.add("form-box"),t.innerHTML='\n\t  <span class="radio-input-wrapper">\n      <label for="sticker-checkbox">Send a Sticker?</label>\n      <input id="sticker-checkbox" class="radio-input" type="checkbox" name="toggle_checkbox" onclick="toggleDisplay()">\n    </span>\n\n    <div class="sticker-wrapper text-center ml-4 mr-4">\n      <h4> Please click on sticker of your choice and fill in how many times you want to send it. </h4>\n    </div>\n\n    <a href="#" class="X delete" onclick="deleteForm()"></a>\n\n    <div id="form_text-container">\n\t    <input class="text-input" id="message" type="text" name="message" placeholder="Type your message" required>\n\t    <input class="text-input" id="name" type="text" name="name" placeholder="YourContactName">\n\t    <input class="text-input" id="mobile" type="text" name="mobile"  placeholder="YourContactNumber">\n\t    <span class="radio-input-wrapper">\n\t      <label for="start">Add @mention to start</label>\n\t      <input id="start" class="radio-input" type="radio" name="addTo" value="start">\n\t    </span>\n\t    <span class="radio-input-wrapper">\n\t      <label for="end">Add @mention to End</label>\n\t      <input id="end" class="radio-input" type="radio" name="addTo" value="end">\n\t    </span>\n    </div>\n\n    <input id="strike-counter" class="text-input" type="number" name="strike-counter" placeholder="For how many times?" required>\n    <button id="launch" class="spam-btns" type="button" name="spam-btn" onclick="spam()">Spam it !</button>\n    ',e.appendChild(t)}createForm();var spamForm=document.getElementById("form"),switchToStickerCheckbox=document.getElementById("sticker-checkbox"),formTextContainer=document.getElementById("form_text-container"),launchButton=document.getElementById("launch"),strikeCount=document.getElementById("strike-counter"),whatsappMessageContainer=document.querySelectorAll(SELECTOR_WHATSAPP_MESSAGE_CONTAINER)[1];function toggleDisplay(){}function deleteForm(){spamForm.remove()}function getFormInput(){let e={message:"",contactName:"",contactNumber:"",counter:"",mentionAtStart:"",mentionAtEnd:""};return e.message=document.getElementById("message").value,e.contactName=document.getElementById("name").value,e.contactNumber=document.getElementById("mobile").value,e.counter=parseInt(strikeCount.value),e.mentionAtStart=document.getElementById("start").checked,e.mentionAtEnd=document.getElementById("end").checked,e}function mentionUser(){var e=getFormInput();if(""!=e.contactName&&""!=e.contactNumber){let n=document.createElement("span");n.setAttribute("class","copyable-text selectable-text"),n.setAttribute("data-mention-jid",e.contactNumber+"@c.us"),n.setAttribute("data-original-name",e.contactName),n.setAttribute("data-plain-text",e.contactName);let t=document.createElement("span");t.setAttribute("class","at-symbol");let a=document.createElement("span");return a.innerHTML=e.contactName,n.appendChild(t),n.appendChild(a),n}}function handleMessage(){let e=getFormInput(),n=mentionUser(),t=document.createTextNode(" "+e.message+" ");e.mentionAtStart?(whatsappMessageContainer.appendChild(n),whatsappMessageContainer.appendChild(t)):e.mentionAtEnd?(whatsappMessageContainer.appendChild(t),whatsappMessageContainer.appendChild(n)):whatsappMessageContainer.appendChild(t)}function spam(){let e=getFormInput();for(let t=0;t<e.counter;t++){handleMessage();var n=document.createEvent("Event");n.initEvent("input",!0,!0),whatsappMessageContainer.dispatchEvent(n),document.querySelector(SELECTOR_WHATSAPP_SEND_BUTTON).click()}}