Skip to content

Instantly share code, notes, and snippets.

@allquixotic
Last active Aug 17, 2018
Embed
What would you like to do?
Hide collapsed and muted channel categories in Discord

First, mute and collapse every channel category you don't care about. You only have to do this once, even if you restart Discord.

Second, click on the "Raw" button next to the file in this Gist named "COPY-THIS.js" (it's right below this readme). Then, press Ctrl+A followed by Ctrl+C. The code is now on your clipboard. We'll use this later. You must do this every time you restart Discord.

Developer Tools Sequence

Step 1 below varies. The remaining steps are the same for Discord Web App and Discord Desktop.

DO ONLY ONE OF THESE vvvvvvv

Discord Web App

  1. In the Discord web app (in Firefox/Chrome/Edge): Press F12 or Ctrl+Shift+I. This should bring up a Developer Tools window.

The exact command to access Developer Tools may vary, so Google it if this doesn't bring up the developer tools window.

-OR-

Discord Desktop App

  1. Press Ctrl+Shift+I to bring up Developer Tools.

END OF 'DO ONLY ONE OF THESE' ^^^^^^^^

For Web App and Desktop alike:

  1. Click "Console" tab.
  2. Paste the code contents using Ctrl+V into the console prompt (the line at the bottom) and press enter. Ignore Discord's warning about this code being dangerous; it isn't.
  3. Now you can close the Developer console.
  4. After you scroll in the channel list, it may take up to 3 seconds for the extra categories to be removed.
  5. Repeat these steps if you restart your Discord desktop app or refresh/reload your Discord Web App.
function vaniche(){for(var e=document.evaluate("//div[contains(@class, 'container-') and div/div[contains(@class, 'wrapperMuted-')]]",document,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE,null),n=e.iterateNext(),t=new Array;n;)t.push(n),n=e.iterateNext();for(var a=t.length,i=0;i<a;i++)t[i].style.display="none";setTimeout(vaniche,3e3)}vaniche();
//THIS IS THE UN-MINIFIED CODE. IF YOU ARE JUST USING THE CODE, YOU DO NOT NEED THIS. JUST COPY THE COPY-THIS.JS ABOVE!
function vaniche() {
var ells = document.evaluate("//div[contains(@class, 'container-') and div/div[contains(@class, 'wrapperMuted-')]]", document, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE, null);
var ell = ells.iterateNext();
var ella = new Array();
while(ell) {
ella.push(ell);
ell = ells.iterateNext();
}
var ellalen = ella.length;
for(var i = 0; i < ellalen; i++) {
ella[i].style.display = "none";
}
setTimeout(vaniche, 3000);
}
vaniche();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment