Last active
April 6, 2017 09:25
-
-
Save kuntau/d6b571cdd7f304d66b71015083aafd44 to your computer and use it in GitHub Desktop.
Hide Discordapp channel sidebar
This file contains 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
//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