Skip to content

Instantly share code, notes, and snippets.

@sbolel
Created March 27, 2022 23:30
Show Gist options
  • Save sbolel/8f1fbd3936ba68d3b4afa0a2604beb28 to your computer and use it in GitHub Desktop.
Save sbolel/8f1fbd3936ba68d3b4afa0a2604beb28 to your computer and use it in GitHub Desktop.
Tinder Auto Swipe Right via JS Console
/**
* @module sbolel/tinder-auto-swiper
* Usage: copy/paste following scripts in the dev console and run
*/
/**
* Make the tiny profile cards bigger
*/
(function() {
const css = `
div[data-testid="recsCardboard"],
div[data-testid="profileCard"] { zoom: 1.5 !important; }
`
const container = document.querySelector(`body`)
const style = document.createElement('style')
style.innerHTML = css
container.appendChild(style)
})()
/**
* Auto-Swipe right
* - [CTRL+l] start/stop liking
* - [CTRL+z] rewind last like, stop liking
*/
(function() {
const timeout = 1500
let id = null
const click = (id) => document.querySelector(`button[data-testid="${id}"]`).click()
const clickLike = () => click('gamepadLike')
const clickRewind = () => click('gamepadRewind')
const enable = () => {
if (id === null) {
id = setInterval(() => clickLike(), timeout)
}
}
const disable = () => {
if (id !== null && Number.isInteger(id)) {
clearInterval(id)
id = null
}
}
document.addEventListener('keydown', event => {
if (event.ctrlKey && event.key === 'z') {
disable()
clickRewind()
}
if (event.ctrlKey && event.key === 'l') {
if (id === null) enable()
else disable()
}
})
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment