Auto WhatsApp : index based (b64)
var data = 'YWFhYQ,YmJiYg,Y2NjYw'; var counter = 0; var messagex = ''; var checkpost = 'yes'; function countDivsWithRoleRow() { const count = document.querySelectorAll('div[role="row"]').length; if (count !== countDivsWithRoleRow.prevCount) { countDivsWithRoleRow.prevCount = count; handleCountChange(count); } } function handleCountChange(count) { autowpx(); } countDivsWithRoleRow.prevCount = -2; setInterval(countDivsWithRoleRow, 500); function autowpx() { if (checkpost == 'no') {} else { cindex(); autowp(); } } function cindex() { let dataArray = data.split(','); let currentValue = dataArray[counter]; messagex = atob(currentValue); // Assign the value to messagex counter = (counter + 1) % dataArray.length; } function autowp() { checkpost = 'no'; sendMessage(messagex); setTimeout(function() { checkpost = 'yes'; }, 2000); } function sendMessage(message) { const mainEl = document.querySelector('#main'); const textareaEl = mainEl.querySelector('div[contenteditable="true"]'); if (!textareaEl) { throw new Error('There is no opened conversation'); } textareaEl.focus(); document.execCommand('insertText', false, message); textareaEl.dispatchEvent(new Event('change', { bubbles: true })); setTimeout(() => { (mainEl.querySelector('[data-testid="send"]') || mainEl.querySelector('[data-icon="send"]')).click(); }, 100); }
Newer Post
Older Post
Home
Loading...
Programmed by Subham Mandal
▣
✖
Loading...