Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 22 additions & 10 deletions followBot.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
(() => {
let i = 0;
const followInterval = setInterval(() => {
if (i >= 30) clearInterval(followInterval);
const buttons = document.querySelectorAll('button');
const nextButton = buttons[i];
if (nextButton.textContent.toLowerCase() === 'follow') { // write in your language
nextButton.click();
}
i++;
}, 500)
})()
let count = 0;
function dosomething() {
const newInterval = setInterval(() => {
const btn = document.querySelectorAll('button');
const nxt_btn = btn[i];
if (nxt_btn !== undefined && nxt_btn.textContent.toLowerCase() === 'follow') {
nxt_btn.click();
console.log("Followed : " + (count+1) + ". " + nxt_btn.parentElement.parentElement.childNodes[1].firstElementChild.firstElementChild.firstElementChild.firstElementChild.text);
count++;
}
i++;
if(count >= 30){
console.log("sleep for 1 hrs ");
count = 0;
i = 0;
clearInterval(newInterval);
}
}, 1000)
}
dosomething();
setInterval(dosomething, 360000);
})()
17 changes: 17 additions & 0 deletions unfollow-bot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
(() => {
let i = 0;
const followInterval = setInterval(() => {
if (i >= 30) clearInterval(followInterval);
const buttons = document.querySelectorAll('button');
const nextButton = buttons[i];
if (nextButton.textContent.toLowerCase() === 'following') {
nextButton.click();
}
const temp1 = document.querySelectorAll('button');
const temp = temp1[0];
if (temp.textContent.toLowerCase() === 'unfollow') {
temp.click();
}
i++;
}, 500)
})()