Last active
February 5, 2023 04:03
-
-
Save jbinfo/9e9261d7f43cf140b724 to your computer and use it in GitHub Desktop.
auto twitter follow script
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
;(function(global, $) { | |
/**** PARAMETERS BLOCK ************************/ | |
var miniFollowersToIgnore = 0, | |
miniFollowingToKeep = 1000, | |
secondes = Math.floor((Math.random() * 10) + 10), | |
enableBioFilter = false, | |
userBioKeywords = [ | |
'devel', 'code', 'analysis', | |
'cloud', 'unix', 'tech', 'computer', | |
'.net', 'freelance', 'guru', 'UX', | |
'program', 'social', 'python', 'ios', | |
'php', 'web', 'technology', 'design', | |
'software', 'engineer', 'geek', | |
'technical', 'commerce', 'research', | |
'IT', 'tecno', 'university', 'ruby' | |
] | |
; | |
/**** END PARAMETERS BLOCK ********************/ | |
var isInFollowingTab = global.top.location.pathname.indexOf('following') > -1, | |
delayBwActions = 0 | |
; | |
var actionBtnClick = function(item) { | |
if($(item).find('.following-text').is(isInFollowingTab ? ':visible': ':hidden')) { | |
delayBwActions += secondes; | |
setTimeout( | |
function() { | |
$(item).click(); | |
}, | |
delayBwActions * 1000 | |
); | |
} | |
} | |
$($('.user-actions-follow-button').get().reverse()).each(function(index, item) { | |
if (isInFollowingTab && index < miniFollowingToKeep) { | |
return; | |
} | |
if (!isInFollowingTab && index < miniFollowersToIgnore) { | |
return; | |
} | |
if (isInFollowingTab || !enableBioFilter) { | |
actionBtnClick(item); | |
return; | |
} | |
var bio = $(item).parents('.ProfileCard-content').find('.ProfileCard-bio').text().toLowerCase(); | |
$.each(userBioKeywords, function(keywIndex, keyw) { | |
if (bio.indexOf(keyw) > -1) { | |
actionBtnClick(item); | |
return false; | |
} | |
}); | |
}); | |
})(window, $); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment