Skip to content

Instantly share code, notes, and snippets.

@andboson
Created March 21, 2017 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andboson/75c32bbc761506b0e57cc367013b8f78 to your computer and use it in GitHub Desktop.
Save andboson/75c32bbc761506b0e57cc367013b8f78 to your computer and use it in GitHub Desktop.
toggle Slack channels list
var channels = document.querySelector('.channel_list_header_label');
var list = document.querySelector('#channel-list');
channels.addEventListener('click', function(e){
e.preventDefault();e.stopImmediatePropagation();
if (list.style.height != '20px') {
list.style.height = '20px';list.style.overflowY = 'scroll';
} else {
list.style.height = 'auto';list.style.overflowY = 'auto';
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment