Skip to content

Instantly share code, notes, and snippets.

@jeffrafter
Created July 10, 2013 16:55
Show Gist options
  • Save jeffrafter/5968035 to your computer and use it in GitHub Desktop.
Save jeffrafter/5968035 to your computer and use it in GitHub Desktop.
Oh Hey. In Slack.
var channels = [];
$('a.channel_name').each(function() {
channels.push($(this).attr('href').replace('/channels/', ''));
});
function ohey() {
setTimeout(function() {
if (channels.length == 0) return;
var chan = channels.pop();
$('#message-input').val('/open '+chan);
$('#message-input').parents('form').submit();
setTimeout(function() {
$('#message-input').val('oh hey');
$('#message-input').parents('form').submit();
ohey();
}, 100);
}, 100);
}
ohey();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment