Skip to content

Instantly share code, notes, and snippets.

@bcamargogui
Created October 5, 2019 05:23
Show Gist options
  • Save bcamargogui/582ae0d5b80c57fc468ecb7373f6910e to your computer and use it in GitHub Desktop.
Save bcamargogui/582ae0d5b80c57fc468ecb7373f6910e to your computer and use it in GitHub Desktop.
tinder like almost everyone trick
// High variables
const interval = 500
const qsLike = '[aria-label="Like"]'
const qsUnlike = '[aria-label="Nope"]'
const qsOpenCard = '.recCard'
const qsBioBox = '.profileCard__bio'
// Statistics
var liked = 0
var unliked = 0
var fails = 0
// Yeah, i'm not like this words
const unlikeBioWords = [
'trans',
'gorda',
'gordinha'
]
// Open the tcheca (by mc lan novamenteee)
const openCard = () => document.querySelector(qsOpenCard).lastElementChild.click()
// Get bio
const getBio = () => {
const el = document.querySelector(qsBioBox)
if (!el) return false;
return el.lastElementChild.innerText.toLowerCase()
}
// Filter girls
const checkBio = () => {
// Capture card info
let bio = getBio()
// Check bio
if (!bio) return likeGirl();
// Search all bad words in bio
unlikeBioWords.forEach(unlike => { if (bio.indexOf(unlike) !== -1) return unlikeGirl() })
// if not found, Finish liking
likeGirl()
}
// You know
const likeGirl = () => {
// Click button
let btn = document.querySelector(qsLike)
// Validate
if (!btn) return
// Action
btn.click()
// Increment
liked++;
}
// You know
const unlikeGirl = () => {
// Click button
let btn = document.querySelector(qsUnlike)
// Validate
if (!btn) return
// Action
btn.click()
// Increment
unliked++;
}
// Prevent infinite fails ========= MAIN
if (fails < 5) {
setInterval(() => {
openCard()
setTimeout(() => checkBio(), 200)
}, interval)
} else {
alert(
"Liked: " + liked + "\n" +
"Unliked: " + unliked
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment