Skip to content

Instantly share code, notes, and snippets.

@kuntau
Last active April 6, 2017 09:25
Show Gist options
  • Save kuntau/d6b571cdd7f304d66b71015083aafd44 to your computer and use it in GitHub Desktop.
Save kuntau/d6b571cdd7f304d66b71015083aafd44 to your computer and use it in GitHub Desktop.
Hide Discordapp channel sidebar
//ref: http://andrewhfarmer.com/hide-discord-sidebar/
document.addEventListener('keydown', function(event) {
if (event.metaKey && event.keyCode === 220) {
// Toggle visibility of the channel and guilds columns
var channelWrap = $('.flex-vertical.channels-wrap');
var guildsWrap = $('.guilds-wrapper');
var titleWrap = $('.title-wrap');
if (channelWrap.getAttribute('style') === 'display: none') {
channelWrap.setAttribute('style', '');
guildsWrap.setAttribute('style', '');
if (titleWrap) {
titleWrap.setAttribute('style', '');
}
} else {
channelWrap.setAttribute('style', 'display: none');
guildsWrap.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