Skip to content

Commit

Permalink
Merge pull request #23 from isklikas/master
Browse files Browse the repository at this point in the history
Corrected random to randomize and ported the remaining Unfollow features
  • Loading branch information
ahmadudin authored Jan 13, 2018
2 parents 0982b87 + 0b4488d commit d18aba5
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
node_modules/

sketch\.txt

package-lock.json
23 changes: 18 additions & 5 deletions assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ var params = {
fFollowingAmount: "",
fFollowingDelay: "",
unfollowAmount: "",
unfollowMethod: "",
unfollowOrder: "",
unfollowDelay: "",
interactAmount: "",
interactPercent: ""
},
Expand Down Expand Up @@ -220,7 +223,7 @@ var app = {
if (option.interactRandom) {
random = "True";
}
content = `\nsession.set_user_interact(amount=${data.interactAmount}, random=${random}, percentage=${data.interactPercent})\n`;
content = `\nsession.set_user_interact(amount=${data.interactAmount}, randomize=${random}, percentage=${data.interactPercent})\n`;
}

return content;
Expand Down Expand Up @@ -284,7 +287,7 @@ var app = {
}
content = `\nsession.follow_user_followers([${this.parser(
data.fFollowersUsers
)}], amount=${data.fFollowersAmount}, sleep_delay=${data.fFollowersDelay}, random=${random}, interact=${interact})`;
)}], amount=${data.fFollowersAmount}, sleep_delay=${data.fFollowersDelay}, randomize=${random}, interact=${interact})`;
}

return content;
Expand All @@ -303,7 +306,7 @@ var app = {
}
content = `\nsession.follow_user_following([${this.parser(
data.fFollowingUsers
)}], amount=${data.fFollowingAmount}, sleep_delay=${data.fFollowingDelay}, random=${random}, interact=${interact})`;
)}], amount=${data.fFollowingAmount}, sleep_delay=${data.fFollowingDelay}, randomize=${random}, interact=${interact})`;
}

return content;
Expand All @@ -321,9 +324,19 @@ var app = {
},
unfollowUsers: function(on) {
var content = ``;

if (on) {
content = `\nsession.unfollow_users(amount=${data.unfollowAmount})`;
if (data.unfollowMethod == "InstaPy") {
var instaPyMode = `'${data.unfollowMethod}'`;
var onlyInstaPyMode = "True";
content = `\nsession.unfollow_users(amount=${data.unfollowAmount}, onlyInstapyFollowed=${onlyInstaPyMode}, onlyInstapyMethod:${instaPyMode}, sleep_delay=${data.unfollowDelay})`;
}
else if (data.unfollowMethod == "NotFollowing") {
var onlyNotMode = "True";
content = `\nsession.unfollow_users(amount=${data.unfollowAmount}, onlyNotFollowMe=${onlyNotMode}, sleep_delay=${data.unfollowDelay})`;
}
else {
content = `\nsession.unfollow_users(amount=${data.unfollowAmount}, sleep_delay=${data.unfollowDelay})`;
}
}

return content;
Expand Down
35 changes: 33 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -484,10 +484,41 @@
<div class="one wide field">
<label>Users</label>
</div>
<div class="fourteen wide field">
<div class="three wide field">
<div class="ui mini input">
<input id="unfollowAmount" type="number" placeholder="30">
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="unfollowMethod" value="InstaPy">
<label>InstaPy</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="unfollowMethod" value="NotFollowing">
<label>Not Following</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="unfollowMethod" checked="checked" value="None">
<label>None</label>
</div>
</div>
<div class="four wide field">
<div class="ui mini input">
<input id="unfollowOrder" type="text" placeholder="InstaPy only (FIFO/LIFO)">
</div>
</div>
<div class="one wide field">
<label>Delay(s)</label>
</div>
<div class="field">
<div class="ui mini input">
<input id="unfollowDelay" type="text" placeholder="10">
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -582,4 +613,4 @@
})
;
</script>
</html>
</html>

0 comments on commit d18aba5

Please sign in to comment.