Last active
December 26, 2018 11:24
-
-
Save EliasJorgensen/c95e2f776ad64c8a8fbc8981a728b979 to your computer and use it in GitHub Desktop.
Slack invite all script
This file contains 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
// 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