Last active
November 18, 2019 13:39
-
-
Save andreystarkov/1daf96432962a85ba5ad8f701495dd48 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Открываешь чаты в badoo.com, слева должен быть список с именами | |
// Справа должен быть чат | |
// Прокручиваешь до самого низу диалоги (что бы были прогружены все) | |
// В таком состоянии открываешь инспектор (правой кнопкой по пустому месту) | |
// Открываешь вкладку Console и туда вставляешь весь код ниже | |
// Жмешь Enter | |
const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms)) | |
function getMessage () { | |
// const age = parseInt(document.querySelector('.connection-header__age').innerText.split(', ')[1]) | |
const name = document.querySelector('.connection-header__name').innerHTML | |
// тут пишем сообщеиие | |
const message = `Привет, ${name}, бла бла бла бла` | |
console.log(`Залечиваем ${name}`, { name, message }) | |
return { name, message } | |
} | |
let uids = [] | |
const pushUid = e => uids.push(parseInt(e.dataset.uid)) | |
document.querySelectorAll('[data-uid]').forEach(pushUid) | |
function setMessageInput (message) { | |
document.querySelector('.messenger-tools__input').innerHTML = message | |
} | |
const getItem = (id) => document.querySelector(`[data-uid="${uids[id]}"]`) | |
const getLastMessage = () => document.querySelectorAll('.message-bubble-simple') | |
const sendMessage = () => document.querySelector('.messenger-tools__btn').click() | |
async function biteThemAll () { | |
for (let id in uids) { | |
await delay(1600) | |
getItem(id).click() | |
const { message } = getMessage() | |
setMessageInput(message) | |
let fuck = false | |
const checkFuck = f => { | |
if (f.innerHTML === message) fuck = true | |
} | |
getLastMessage().forEach(checkFuck) | |
if (!fuck) { | |
await delay(500) | |
sendMessage() | |
await delay(200) | |
} | |
} | |
} | |
console.clear() | |
biteThemAll() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment