-
-
Save ScoreUnder/203face29ae5a718f641fdb86a7430ed 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/ | |
var cmd$ = $; | |
document.addEventListener('keydown', function(event) { | |
if (event.metaKey && event.keyCode === 220) { | |
// Toggle visibility of the channel and guilds columns | |
var channelWrap = cmd$('.flex-vertical.channels-wrap'); | |
var guildsWrap = cmd$('.guilds-wrapper'); | |
var titleWrap = cmd$('.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