Create liker.js

This commit is contained in:
Janis Hau 2018-12-15 13:17:28 +01:00 committed by GitHub
parent e32488d872
commit d4359325db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

39
liker.js Normal file
View File

@ -0,0 +1,39 @@
/*
* Tinder Auto Liker
* Copy and paste the code on the tinder matching site in the developer console.
*
* have fun
*/
var $likeBTN = $('.recsGamepad__button--like'),
count = 0,
times = 9999,
duration = 750;
function msToTime(s) {
// Pad to 2 or 3 digits, default is 2
function pad(n, z) {
z = z || 2;
return ('00' + n).slice(-z);
}
var ms = s % 1000;
s = (s - ms) / 1000;
var secs = s % 60;
s = (s - secs) / 60;
var mins = s % 60;
var hrs = (s - mins) / 60;
return pad(hrs) + ':' + pad(mins) + ':' + pad(secs) + '.' + pad(ms, 3);
}
var counting = 1;
(function myLoop (i) {
setTimeout(function () {
count++;
counting++;
$likeBTN.click();
if (--i) myLoop(i);
console.log( count + ' of ' + times + ' - ' + 'estimated time left: ' + msToTime( duration * (parseInt(times - counting)) ) );
}, duration)
})(times);