Automatically Unfollow non Followers on Steemit script
First we want to form an array that contains all our followers:
1.Open new text document and paste the following code
<html>
<script src="http://cdn.steemjs.com/lib/latest/steem.min.js"></script>
<script>
function mojaFunkcija(){
steem.api.getFollowers
('emirk',
'a-0-0',
null,
1000,
function(err, result)
{
if(err) console.log(err);
else
{
for(i=0;i<result.length;i++)
{
var x="\""+result[i].follower+"\",";
document.write(x);
}
}
}
);
}
mojaFunkcija();
</script>
<body>
</body>
</html>
-replace: 'emirk' with your username,'a-0-0' with a name of you first follower on your followers page,and 1000 with a number of your followers(or a number greater than that)
2.Save file as .html and open it
3.-Copy all data from a page without the last ','
-open new text document and write var niz=[]; paste data inside the brackets
-below that paste the following code
var isFollower=function(s){
var dobar=false;
for(i=0;i<niz.length;i++)
{
if(niz[i]===s)
{
//dodat da obrise tog da manje trazi kasnije
dobar=true;
break;
}
}
return dobar;
}
var unfollowPeople = function() {
var x = document.getElementsByClassName("button slim hollow secondary ");
var i;
var unfollowCount = 0;
for (i = 0; i < x.length; i++) {
var t1 = x[i].parentElement;
var t2 = t1.parentElement;
t1=t2.nextSibling.innerText;
if (x[i].innerHTML === 'Unfollow'&& isFollower(t1)==false) {
unfollowCount++;
x[i].click();
}
if (i == x.length - 1) {
if (unfollowCount == 0) {
imdNextFollow();//manje treba sacekat ako nije nikoga unfollowao
} else {
setTimeout(function() {
nexPage();
}, 20000);
}
}
}
}
var nexPage = function() {
setTimeout(function() {
var y = document.getElementsByClassName("button tiny hollow float-right");
y[0].click();
setTimeout(function() {
unfollowPeople();
}, 2000);
}, 20000);
};
var imdNextFollow = function() {
var y = document.getElementsByClassName("button tiny hollow float-right");
y[0].click();
setTimeout(function() {
unfollowPeople();
}, 2000);
};
unfollowPeople();
4.Now go to your's following page and open Browser console by pressing F12 and paste all the code from that new text document
5.Click Enter and this will automatically keep moving to next page and continue clicking the unfollow button for all people that are not your followers(are not in that array you created)
NOTE: -This code could be more optimized and written to be fully automatic, but I just wanted to quickly write the code to automatically unfollow all my non followers
-If you want to see how to automatically follow people from any steemit profile check this post(I edited that code to serve new purpose)
https://steemit.com/steemit/@sundarrajan/automatically-follow-people-from-any-steemit-profile
-This will reduce your remaining bandwidth which you can track at steemd.com/@your_username
Leave Automatically Unfollow non Followers on Steemit script to:
Read more #steemit posts
Best Posts From emirk
We have not curated any of emirk's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From emirk
- How Much Your ROI Has To Be To Return Your Invested SBD When Buying Upvotes(Based On The Price Of SBD)?
- How To Get 3000+ Followers In A Couple of Days and Therefore Promote Your Post For FREE(Doing Almost Nothing!)
- 1000 Followers Giveaway Results
- 1000 Followers reached, 5 SBD+50% of SBD Rewards for This Post Giveaway.Thank you all!
- Automatically Unfollow non Followers on Steemit script
- CREDITS-Ethereum Best Competitor?1,000,000+ Transactions per Second, Smart Contract New Advanced Capabilities...Good Buying Opportunity!
- Electroneum-Good Buying Opportunity for Short term or Long term Gains!