Created
March 21, 2017 18:06
-
-
Save andboson/75c32bbc761506b0e57cc367013b8f78 to your computer and use it in GitHub Desktop.
toggle Slack channels list
This file contains hidden or 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
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