Skip to content

Instantly share code, notes, and snippets.

@elais
Created March 23, 2016 15:44
Show Gist options
  • Save elais/4405d28d53501b5deedd to your computer and use it in GitHub Desktop.
Save elais/4405d28d53501b5deedd to your computer and use it in GitHub Desktop.
Hides Discord sidebar, keeping server list
window.addEventListener('keydown', function(event) {
if (event.ctrlKey && event.keyCode === 84) {
var channelWrap = $('.flex-vertical.channels-wrap');
var titleWrap = $('.title-wrap');
if (channelWrap.getAttribute('style') === 'display: none') {
channelWrap.setAttribute('style', '');
if (titleWrap) {
titleWrap.setAttribute('style', '');
}
} else {
channelWrap.setAttribute('style', 'display: none');
if (titleWrap) {
titleWrap.setAttribute('style', 'padding-left: 70px');
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment