Skip to content

Instantly share code, notes, and snippets.

@EliasJorgensen
Last active December 26, 2018 11:24
Show Gist options
  • Save EliasJorgensen/c95e2f776ad64c8a8fbc8981a728b979 to your computer and use it in GitHub Desktop.
Save EliasJorgensen/c95e2f776ad64c8a8fbc8981a728b979 to your computer and use it in GitHub Desktop.
Slack invite all script
// source: https://webapps.stackexchange.com/a/104172
//////////////////////////////
// AFTER.JS Module
//////////////////////////////
var After = function () {
this._totalTime = 0;
};
// It's prototype
var protoAfter = {
// After (time) seconds, run a handler
after: function (time, handler) {
this._totalTime += time;
setTimeout(function () {
handler();
}, this._totalTime * 1000);
return this;
}
};
$.extend(After.prototype, protoAfter);
//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ End of After section
var first = "a",
last = "z";
var after = new After();
after.charIndex = first.charCodeAt(0);
for (var i = first.charCodeAt(0); i <= last.charCodeAt(0); i++) {
after
.after(0.3, function () {
$('#channel_actions_toggle').click();
})
.after(0.3, function () {
$('#channel_invite_item').click();
})
.after(0.3, function () {
$("#channel_invite_filter").focus();
$("#channel_invite_filter").val(String.fromCharCode(after.charIndex)); // type in character
$("#channel_invite_filter").trigger("input");
after.charIndex++;
})
.after(0.5, function () {
$(".add_icon").click();
})
.after(0.5, function () {
$(".invite_go").click();
})
.after(0.5, function () {
$("#fs_modal_close_btn").click();
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment