3
10
Fork
You've already forked Discord-CSS-Tweaks
1

Remove "Suggested" panel on servers #19

Open
opened 2026年03月18日 08:32:00 +01:00 by KizGalaxy · 5 comments

I don't know how feasible it is to remove this section from servers but it is very annoying. No matter how many times I dismiss the "Suggested" tab it always comes back after some time. If I've deliberately opted out of seeing some channels why must discord put them in face either way?

image

This is a minor issue in the grand scheme of things so if it's more trouble than it's worth feel free to close this issue.

Here's the HTML:

<div class="sectionDivider__629e4"></div>
<li class="containerDefault__29444"><div class="iconVisibility__29444 wrapperStatic__29444 wrapperCommon__29444"><div class="mainContent__29444"><h3 class="name__29444 container__13cf1 header__13cf1 text-sm/medium__13cf1"><div class="overflow_b0dfc2">Suggested</div><span style="display: none;"></span></h3></div><span><div class="dismissButton__29444" role="button" tabindex="0"><svg class="dismiss__29444" aria-hidden="true" role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="transparent" class=""></circle><path fill="currentColor" fill-rule="evenodd" d="M12 23a11 11 0 1 0 0-22 11 11 0 0 0 0 22Zm4.7-15.7a1 1 0 0 0-1.4 0L12 10.58l-3.3-3.3a1 1 0 0 0-1.4 1.42L10.58 12l-3.3 3.3a1 1 0 1 0 1.42 1.4L12 13.42l3.3 3.3a1 1 0 0 0 1.4-1.42L13.42 12l3.3-3.3a1 1 0 0 0 0-1.4Z" clip-rule="evenodd" class=""></path></svg></div></span><span id="«r2kro»" class="hiddenVisually_b18fe2">Clear</span></div></li>
<li class="containerDefault_c69b6d" data-dnd-name="🎮|gaming"><div class="iconVisibility_c69b6d wrapper__2ea32 modeUnreadImportant__2ea32"><div class="unread__2ea32 unreadImportant__2ea32"></div><div class=""><a href="/channels/1072873391855501312/1444873327712665670" role="link" target="_blank" class="link__2ea32" data-list-item-id="channels___1444873327712665670" tabindex="-1" aria-label="unread, 🎮|gaming (text channel)"><div class="linkTop__2ea32"><div role="img" aria-label="Text icon" class="iconContainer__2ea32" aria-describedby="«r2krp»"><svg class="icon__2ea32" aria-hidden="true" role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" d="M10.99 3.16A1 1 0 1 0 9 2.84L8.15 8H4a1 1 0 0 0 0 2h3.82l-.67 4H3a1 1 0 1 0 0 2h3.82l-.8 4.84a1 1 0 0 0 1.97.32L8.85 16h4.97l-.8 4.84a1 1 0 0 0 1.97.32l.86-5.16H20a1 1 0 1 0 0-2h-3.82l.67-4H21a1 1 0 1 0 0-2h-3.82l.8-4.84a1 1 0 1 0-1.97-.32L15.15 8h-4.97l.8-4.84ZM14.15 14l.67-4H9.85l-.67 4h4.97Z" clip-rule="evenodd" class=""></path></svg></div><span id="«r2krp»" class="hiddenVisually_b18fe2">Text</span><div class="name__2ea32 overflow_b0dfc2" aria-hidden="true">🎮|gaming</div><span style="display: none;"></span><div class="children__2ea32"><span><div class="iconItem_c69b6d iconBase_c69b6d iconNoChannelInfo_c69b6d" tabindex="0" aria-label="Invite to Channel" role="button"><svg class="actionIcon_c69b6d" aria-hidden="true" role="img" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 24 24"><path d="M19 14a1 1 0 0 1 1 1v3h3a1 1 0 0 1 0 2h-3v3a1 1 0 0 1-2 0v-3h-3a1 1 0 1 1 0-2h3v-3a1 1 0 0 1 1-1Z" fill="currentColor" class=""></path><path d="M16.83 12.93c.26-.27.26-.75-.08-.92A9.5 9.5 0 0 0 12.47 11h-.94A9.53 9.53 0 0 0 2 20.53c0 .81.66 1.47 1.47 1.47h.22c.24 0 .44-.17.5-.4.29-1.12.84-2.17 1.32-2.91.14-.21.43-.1.4.15l-.26 2.61c-.02.3.2.55.5.55h7.64c.12 0 .17-.31.06-.36C12.82 21.14 12 20.22 12 19a3 3 0 0 1 3-3h.5a.5.5 0 0 0 .5-.5V15c0-.8.31-1.53.83-2.07ZM12 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z" fill="currentColor" class=""></path></svg></div></span><span id="«r2krq»" class="hiddenVisually_b18fe2">Invite to Channel</span></div></div></a></div></div></li>
<div class="sectionDivider__629e4"></div>
I don't know how feasible it is to remove this section from servers but it is very annoying. No matter how many times I dismiss the "Suggested" tab it always comes back after some time. If I've deliberately opted out of seeing some channels why must discord put them in face either way? ![image](/attachments/bc4619a4-3f40-4cf1-b034-9f8f5587e33d) This is a minor issue in the grand scheme of things so if it's more trouble than it's worth feel free to close this issue. Here's the HTML: ``` <div class="sectionDivider__629e4"></div> <li class="containerDefault__29444"><div class="iconVisibility__29444 wrapperStatic__29444 wrapperCommon__29444"><div class="mainContent__29444"><h3 class="name__29444 container__13cf1 header__13cf1 text-sm/medium__13cf1"><div class="overflow_b0dfc2">Suggested</div><span style="display: none;"></span></h3></div><span><div class="dismissButton__29444" role="button" tabindex="0"><svg class="dismiss__29444" aria-hidden="true" role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="transparent" class=""></circle><path fill="currentColor" fill-rule="evenodd" d="M12 23a11 11 0 1 0 0-22 11 11 0 0 0 0 22Zm4.7-15.7a1 1 0 0 0-1.4 0L12 10.58l-3.3-3.3a1 1 0 0 0-1.4 1.42L10.58 12l-3.3 3.3a1 1 0 1 0 1.42 1.4L12 13.42l3.3 3.3a1 1 0 0 0 1.4-1.42L13.42 12l3.3-3.3a1 1 0 0 0 0-1.4Z" clip-rule="evenodd" class=""></path></svg></div></span><span id="«r2kro»" class="hiddenVisually_b18fe2">Clear</span></div></li> <li class="containerDefault_c69b6d" data-dnd-name="🎮|gaming"><div class="iconVisibility_c69b6d wrapper__2ea32 modeUnreadImportant__2ea32"><div class="unread__2ea32 unreadImportant__2ea32"></div><div class=""><a href="/channels/1072873391855501312/1444873327712665670" role="link" target="_blank" class="link__2ea32" data-list-item-id="channels___1444873327712665670" tabindex="-1" aria-label="unread, 🎮|gaming (text channel)"><div class="linkTop__2ea32"><div role="img" aria-label="Text icon" class="iconContainer__2ea32" aria-describedby="«r2krp»"><svg class="icon__2ea32" aria-hidden="true" role="img" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" d="M10.99 3.16A1 1 0 1 0 9 2.84L8.15 8H4a1 1 0 0 0 0 2h3.82l-.67 4H3a1 1 0 1 0 0 2h3.82l-.8 4.84a1 1 0 0 0 1.97.32L8.85 16h4.97l-.8 4.84a1 1 0 0 0 1.97.32l.86-5.16H20a1 1 0 1 0 0-2h-3.82l.67-4H21a1 1 0 1 0 0-2h-3.82l.8-4.84a1 1 0 1 0-1.97-.32L15.15 8h-4.97l.8-4.84ZM14.15 14l.67-4H9.85l-.67 4h4.97Z" clip-rule="evenodd" class=""></path></svg></div><span id="«r2krp»" class="hiddenVisually_b18fe2">Text</span><div class="name__2ea32 overflow_b0dfc2" aria-hidden="true">🎮|gaming</div><span style="display: none;"></span><div class="children__2ea32"><span><div class="iconItem_c69b6d iconBase_c69b6d iconNoChannelInfo_c69b6d" tabindex="0" aria-label="Invite to Channel" role="button"><svg class="actionIcon_c69b6d" aria-hidden="true" role="img" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 24 24"><path d="M19 14a1 1 0 0 1 1 1v3h3a1 1 0 0 1 0 2h-3v3a1 1 0 0 1-2 0v-3h-3a1 1 0 1 1 0-2h3v-3a1 1 0 0 1 1-1Z" fill="currentColor" class=""></path><path d="M16.83 12.93c.26-.27.26-.75-.08-.92A9.5 9.5 0 0 0 12.47 11h-.94A9.53 9.53 0 0 0 2 20.53c0 .81.66 1.47 1.47 1.47h.22c.24 0 .44-.17.5-.4.29-1.12.84-2.17 1.32-2.91.14-.21.43-.1.4.15l-.26 2.61c-.02.3.2.55.5.55h7.64c.12 0 .17-.31.06-.36C12.82 21.14 12 20.22 12 19a3 3 0 0 1 3-3h.5a.5.5 0 0 0 .5-.5V15c0-.8.31-1.53.83-2.07ZM12 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z" fill="currentColor" class=""></path></svg></div></span><span id="«r2krq»" class="hiddenVisually_b18fe2">Invite to Channel</span></div></div></a></div></div></li> <div class="sectionDivider__629e4"></div> ```
Owner
Copy link

It could possibly be doable. Assuming that's a public guild in the screenshot, could you send me the invite link to it? I'd like to take a look at the code in a few places.

It could possibly be doable. Assuming that's a public guild in the screenshot, could you send me the invite link to it? I'd like to take a look at the code in a few places.

Yeah of course, here you go: https://discord.gg/iisu

Yeah of course, here you go: https://discord.gg/iisu
Owner
Copy link

Ok, so it's a little bit more difficult than I'd imagined.
If there's only ever one suggestion, which is what I got, then you can do this:

/* Remove suggested channels */
div[class^="sidebarList"] li:has([class^="dismissButton"]) {
 + li { + [class^="sectionDivider"] { display: none; } display: none; }
 display: none;
}

I'll be honest, I'm not proud of this code, lol, it's probably a performance hog and let's be honest, not too pretty.
I'm suspecting that this is really pushing the limits of what we can block without having to get into Java/TypeScript plugin shenanigans; which is way out of my wheelhouse.

And also, if Discord ever suggests more than one channel at a time, this won't work either.
Who knows, maybe there are other exciting problems with this code snippet lurking around somewhere.

So I probably won't add it to the list, but it's also the best solution I could personally find. Feel free to use it!

I'll leave the issue open for a while, in case anyone else wants to take a jab at it.

Ok, so it's a little bit more difficult than I'd imagined. If there's only ever one suggestion, which is what I got, then you can do this: ```css /* Remove suggested channels */ div[class^="sidebarList"] li:has([class^="dismissButton"]) { + li { + [class^="sectionDivider"] { display: none; } display: none; } display: none; } ``` I'll be honest, I'm not proud of this code, lol, it's probably a performance hog and let's be honest, not too pretty. I'm suspecting that this is really pushing the limits of what we can block without having to get into Java/TypeScript plugin shenanigans; which is way out of my wheelhouse. And also, if Discord ever suggests more than one channel at a time, this won't work either. Who knows, maybe there are other exciting problems with this code snippet lurking around somewhere. So I probably won't add it to the list, but it's also the best solution I could personally find. Feel free to use it! I'll leave the issue open for a while, in case anyone else wants to take a jab at it.

Thank you for attempting it but I figured it'd be a tall order. I appreciate your effort though!

Thank you for attempting it but I figured it'd be a tall order. I appreciate your effort though!
Owner
Copy link

My pleasure :)

My pleasure :)
Sign in to join this conversation.
No Branch/Tag specified
main
No results found.
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ridge/Discord-CSS-Tweaks#19
Reference in a new issue
ridge/Discord-CSS-Tweaks
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?