Created
February 9, 2018 03:34
-
-
Save shotasenga/2ad1a36f231e8ce36999b69ecbc5401c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// ==UserScript== | |
// @name Tinder Force Like | |
// @namespace http://senta.me/ | |
// @version 0.1.0 | |
// @description Like all girls/guys on tinder.com | |
// @author @__senta | |
// @match https://tinder.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
let heart | |
let modal | |
/** | |
* watch the DOM while it's ready to start | |
*/ | |
requestAnimationFrame(function beReady () { | |
heart = document.querySelector('[aria-label=Like]') | |
modal = document.querySelector('#modal-manager') | |
if (heart && modal) { | |
onReady() | |
} else { | |
requestAnimationFrame(beReady) | |
} | |
}) | |
/** | |
* Start like | |
*/ | |
function onReady () { | |
requestAnimationFrame(function tick () { | |
heart.click() | |
modal.firstChild || requestAnimationFrame(tick) | |
}) | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment