Created
March 27, 2022 23:30
-
-
Save sbolel/8f1fbd3936ba68d3b4afa0a2604beb28 to your computer and use it in GitHub Desktop.
Tinder Auto Swipe Right via JS Console
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
/** | |
* @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