Skip to content

Instantly share code, notes, and snippets.

@Poliwrath
Last active November 30, 2023 08:33
Show Gist options
  • Save Poliwrath/bde927683fc239379ea13f084297e5bf to your computer and use it in GitHub Desktop.
Save Poliwrath/bde927683fc239379ea13f084297e5bf to your computer and use it in GitHub Desktop.
Firefox things to make Discord "better"
These are my personal things for making Discord's web app bearable for me -- a barebones text chat application.
Almost all nitro / payment / game / voice chat stuff has been hidden / blocked.
If something breaks / looks wrong, I'll probably eventually fix it myself, but please leave comments.
A lot of the ublock filters only work if your language is set to English.
Strongly recommend
08/22/2022 - as of current PTB, performance on Firefox has yet again worsened.
Related bugzilla entries:
https://bugzilla.mozilla.org/show_bug.cgi?id=1605271
https://bugzilla.mozilla.org/show_bug.cgi?id=1763433
07/07/2022 - blocking /profile also prevents your own profile change window from popping up somehow. Thanks Discord~.
Also add URL blocklist option blocking (as of current day it's 250kb), but commented out.
and MORE nitro payment stuff
and "about me" blocking again
and more bot garbage (another bot tag, this is like the 5th one changed in 2 years, and the "add to server" button)
06/05/2022 - stylesheet updated to fix spoiler text as well as a few color changes.
05/12/2022 - new endpoints (PTB?) for "home" channel (feed, active channels), forgotten stickers and events endpoints
04/28/2022 - add compact mode bot tag
04/27/2022 - block chat "start activity" button pushed to PTB, add experimental emoji preview / emoji button blocking
04/26/2022 - block typing indicator, on PTB it causes the whole chat window to shift up by a few pixels any time it shows up
04/20/2022 - actually block the nitro boost button in chat box
04/19/2022 - nitro boost button in chat box, new member leaf, other misc stuff
06/01/2021 - stages.
05/14/2021 - no longer maintaining the stylesheet, discord changes too much too fast and I don't even have the motivation to
bother fixing the chat colours when they're probably going to be changing it every 2 weeks until the inevitable acquisition.
Sorry.
05/05/2020:
thanks for ruining everything and changing your domain for no reason. ♥ love ya discord
https://discord.com
TODO:
Auto update userstyle
Fix formatting?
Fix a lot of stupid filters
uBlock filters: https://gist.githubusercontent.com/Poliwrath/bde927683fc239379ea13f084297e5bf/raw/ublock.txt
Stylus Userstyle: https://gist.githubusercontent.com/Poliwrath/bde927683fc239379ea13f084297e5bf/raw/epic.css
Request Control: https://gist.githubusercontent.com/Poliwrath/bde927683fc239379ea13f084297e5bf/raw/requestcontrol.json
/* Discord darker theme - 2022-06-05 */
/*
For use with the Stylus extension
This also gets rid of MOST colors, use colorblind mode for the rest
Settings -> Accessibility -> saturation 0%, apply to custom color choices
LIKELY BREAKS OFTEN.
*/
/* Globally disables font shadowing, bolding, and transitions */
/* TODO: Maybe only make usernames bolded? This interferes
with certain "captcha" systems.
*/
* {
text-shadow: none !important;
font-weight: normal !important;
-webkit-transition: none !important;
-moz-transition: none !important;
transition: none !important;
}
/* remove a LOT of animations */
div[class^="animatorLeft-"],
div[class^="animatorRight-"],
div[class^="tooltip-"],
div[class^="tooltipLeft-"],
div[class^="tooltipRight-"],
div[class^="sprite-"] {
-webkit-transform: none !important;
-webkit-transform-origin: 50% 50% 0 !important;
transform: none !important;
transform-origin: 50% 50% 0 !important;
}
.theme-dark {
/* remove the hover darken message, but also affects blocked messages... */
--background-message-hover: none;
/* make the dark theme actually dark thanks */
--background-primary: none;
--background-secondary: none;
--background-secondary-alt: none;
--channeltextarea-background: rgb(42, 44, 47);
}
/* darken friends list */
.theme-dark div[class^="container-"] {
background-color: #202225;
}
/* make names slightly grey (because pure white + really dark background doesn't fit well...) */
/* ! colors changed 2022-06-05 to contrast better with background + actual message color ! */
/* TODO:
desaturateUserColors-xxxx.. this is for darkening names in quotes.. maybe remove?
desaturate-xxx
roleCircle-xxx
roleIcon-xxx
*/
/* disable colorblind mode overrides */
.desaturate-user-colors .desaturateUserColors-1O-G89
{
-webkit-filter: none;
filter: none;
}
/* unknown / possibly no longer used? */
span[class^="roleColor-"] {
color: rgb(150, 150, 150) !important;
}
/* role mention / ping text color */
span[class^="roleMention-"] {
color: rgb(150, 150, 150) !important;
}
/* color of name in chat and member list */
span[class^="username-"], span[class^="username-"] > span {
color: rgb(150, 150, 150) !important;
}
/* remove color from playing, streaming, spotify statuses */
div[class^="headerPlaying-"],
div[class^="headerStreaming"],
div[class^="headerSpotify-"] {
background: #202225;
}
div[class^="topSectionPlaying-"],
div[class^="topSectionStreaming"],
div[class^="topSectionSpotify-"] {
background-color: var(--background-tertiary);
}
/* change scrollbars to be system ones */
.theme-dark .scrollerThemed-2oenus.themeGhostHairline-DBD-2d > div[class^="scroller-"] {
scrollbar-color: rgb(50, 52, 55) transparent;
scrollbar-width: auto;
}
.theme-dark .scrollerThemed-2oenus.themedWithTrack-q8E3vB > div[class^="scroller-"] {
scrollbar-color: rgb(44, 46, 49) transparent;
scrollbar-width: auto;
}
/* hide blocked messages, found on github */
div[class^="container-"] {
min-height: 0;
}
div[class^="blockedSystemMessage-"],
div[class*="blockedSystemMessage-"] {
display: none;
}
div[class^="groupStart-"],
div[class^="da-groupStart"] {
display: none;
}
/* make spoilered messages actually visible - kinda bright but whatever. */
/* TODO: This needs matching, otherwise spoilered text will become invisible in like a week */
.theme-dark .spoilerText-27bIiA.hidden-3B-Rum {
background-color: rgb(50, 50, 50);
}
.theme-dark .spoilerText-27bIiA.hidden-3B-Rum:hover {
background-color: rgb(50, 50, 50);
}
[
{
"uuid": "76145de6-dab4-4c91-a3fd-18a51e59b6ce",
"pattern": {
"scheme": "*",
"host": [
"cdn.discordapp.com"
],
"path": [
"avatars*",
"emojis*",
"icons*"
]
},
"types": [
"image"
],
"action": "redirect",
"active": true,
"title": "Discord%20resize%20%3A)",
"redirectUrl": "https://{hostname}{pathname/gif/png}?size=64"
}
]
! Title: uBlock Discord Filters
! Expires: 2 days
! non-tracking network requests
! typing indicator request, comment to make your own typing indicators show
||discord.com/api/*/channels/*/typing$important
! server banners
||cdn.discordapp.com/banners/*$important
! per-server user banners?
||cdn.discordapp.com/guilds/*/users/*/banners/*$important
! rich presence assets
||cdn.discordapp.com/app-assets/*$important
||cdn.discordapp.com/app-icons/*$important
! guild discovery page endpoints?
||discord.com/api/*/users/*/activities/statistics/applications$important
||discord.com/api/*/discoverable-guilds$important
! used for friend statuses on the @me page, useless
||discord.com/api/*/applications/public$important
! might break the status page, but it's fake anyways
||status.discordapp.com/api/*/*/*.json$important
! invite link generation, because i always accidentally press it.
! side effect: you are unable to join servers or see invite embeds
||discord.com/api/*/channels/*/invites$important
! best voice region? idk
||best.discord.media/region$important
! nitro / payment related
||discord.com/api/*/users/@me/billing/*$important
||discord.com/api/*/users/@me/guilds/premium/*$important
||discord.com/api/*/guilds/*/premium/*$important
||discord.com/api/*/users/@me/entitlements/gifts$important
||discord.com/api/*/users/@me/applications/*/entitlements$important
||discord.com/api/*/entitlements/*$important
||discord.com/api/*/users/*/billing/payment-sources$important
||discord.com/api/*/users/*/billing/*$important
||discord.com/api/*/store/published-listings/skus/*/subscription-plans
! server invites?
||discord.com/api/*/invites/*$important
! no idea
||discord.com/api/*/users/@me/survey$important
||discord.com/api/*/users/@me/affinities/guilds$important
||discord.com/api/*/users/@me/affinities/users$important
! profiles (about me, connected accounts, nitro time, etc)
! see note in readme, nickname editing is now using this endpoint
!||discord.com/api/v9/users/*/profile$important
! misc embed icons
||discordapp.net/external/*/https/mega.nz/rich-file.png$image
! none of these exist
||discord.com/assets/*.map$important
||discord.com/assets/*.js.map$important
! tracking network requests
! sent every time you interact with something, literally called "TRACK" internally
||discord.com/api/*/science$important
! canary / opt-out thing
||discord.com/api/*/experiments$important
! games / library related, not needed on web app.
||discord.com/api/*/applications/detectable$important
||discord.com/api/*/applications/*/public$important
||discord.com/api/*/users/@me/library$important
||discord.com/api/*/games$important
||discord.com/games/*$important
! ???
||discord.com/api/*/users/@me/harvest$important
||cdn.discordapp.com/favicon.ico$important
||media.discordapp.net/favicon.ico$important
! user notes
||discord.com/api/*/users/@me/notes/*$important
! useless discord status
||status.discord.com/api/*$important
! calls, might not prevent calls from going through anymore
||discord.com/api/*/channels/*/call$important
! stickers
||discord.com/api/*/users/*/sticker-packs$important
||discord.com/api/*/sticker-packs/directory/*$important
||discord.com/api/*/sticker-packs/directory-v2/*$important
||discord.com/stickers/*/*.json$important
||discord.com/api/*/sticker-packs$important
! stages
||discord.com/api/*/stage-instances$important
! role icons
||cdn.discordapp.com/role-icons/*$important
! ???
||discord.com/api/*/users/*/guild-events$important
||discord.com/api/*/gifs/trending$important
||discord.com/api/*/auth/location-metadata$important
! proper block for calling? (they broke it?)
||discord.com/api/*/voice/regions$important
! I don't remember
||*.discord.media/*$important
! 05/18/2022 ptb activity stuff
||discord.com/api/*/guilds/*/preview$important
||discord.com/api/*/guilds/*/guild-feed$important
||discord.com/api/*/guilds/*/active-channels$important
! event and sticker stuff I forgot
||discord.com/api/*/users/@me/scheduled-events$important
||discord.com/stickers/*.json$important
! URL blocklist
! ||cdn.discordapp.com/bad-domains/hashes.json
! cosmetic
! user statuses (custom / now playing)
discord.com##[class^="customStatus-"]
discord.com##[class^="customStatusText-"]
discord.com##[class^="activity-"]
discord.com##[class^="activityText-"]
discord.com##[class^="activityUserPopout-"]
discord.com##[class^="activityProfile-"]
! server header stuff
! server icons (nitro boost / partner etc)
discord.com##[class^="premiumIcon-"]
discord.com##[class^="guildIconContainer-"]
! nitro ad shilling
discord.com##[class^="premiumPromo-"]
discord.com##[class^="channel-"][href^="/store"]
! user popout stuff
! "pro tip" about users that will always show even if you are discord user for 4+ years
discord.com##[class^="protip-"]
! note text
discord.com##[class^="note-"]
! note "header"
discord.com##[class^="bodyTitle-"]:has-text(Note)
discord.com##[class^="gameIcon-"]
! user profile stuff
! connected accounts
! discord.com##[class^="connectedAccounts-"]
! note
! 07/07/2022 it's "about me"
discord.com##[class^="userInfoSection-"]
! profile badges (nitro, boosting, etc)
discord.com##[class^="profileBadges-"]
! the dumb graphic for no mutual servers / friends
discord.com##[class^="emptyIconGuilds-"]
discord.com##[class^="emptyIconFriends-"]
! loading screen animations / videos
discord.com##[class^="ready-"]
! pinned messages "image"
discord.com##[class^="emptyPlaceholder-"] > [class^="image-"]
! pinned messages protip
discord.com##[class^="messagesPopoutWrap-"] > [class^="footer-"]
! pings protip
discord.com##[class^="recentMentionsPopout-"] > [class^="footer-"]
! the plus (+) button that makes a new group DM
discord.com##[class^="privateChannelRecipientsInviteButtonIcon-"]
! useless buttons on right side of chat box (GIFs / nitro gift / sticker)
discord.com##button[aria-label^="Open GIF picker"]
discord.com##button[aria-label^="Send a gift"]
discord.com##button[aria-label^="Open sticker picker"]
! voice chat buttons
discord.com##button[aria-label^="Mute"]
discord.com##button[aria-label^="Unmute"]
discord.com##button[aria-label^="Deafen"]
discord.com##button[aria-label^="Undeafen"]
! DM buttons
discord.com##div[aria-label^="Start Voice Call"]
discord.com##div[aria-label^="Start Video Call"]
! shows when WebRTC is disabled I think?
discord.com##div[aria-label^="Browser Not Supported"]
discord.com##div[aria-label^="Add Friends to DM"]
discord.com##div[aria-label^="Help"]
discord.com##div[aria-roledescription^="Channel Mute Switch"]
! dumb loading screen meme
discord.com##[class^="quote-"]
! stupid tips on loading creen
discord.com##[class^="tip-"]
discord.com##[class^="tipTitle-"]
! dumb twitter link slide-out if connecting takes longer than 5 seconds
discord.com##[class^="problems-"]
! "welcome to discord" message in the first channel of a server
discord.com##[class^="welcomeMessage-"]
! "we've ruined all of your cookies and userscripts by changing our domain to discord.com for no fucking reason!" message
discord.com##[class^="domainMigrationMessage-"]
! "now playing" stuff on main page
discord.com##[class^="nowPlayingColumn-"]
! big graphical backgrounds
discord.com##[class^="bg-"]
! "find servers" and "download apps" buttons at bottom of server list
discord.com##[class^="listItemWrapper-"]:has(div[aria-label^="Server Discovery"])
discord.com##[class^="listItemWrapper-"]:has(div[aria-label^="Explore Public Servers"])
discord.com##[class^="listItemWrapper-"]:has(div[aria-label^="Download Apps"])
! stupid line that separates servers from the buttons at bottom
discord.com##[class^="guildSeparator-"]
! banner image class
discord.com##[class^="bannerImage-"]
! role icon class
discord.com##[class^="roleIcon-"]
! "let us know if you have any suggestions"
discord.com##[class^="suggestionsText-"]
! wumpus
discord.com##[class^="userSettingsSecurityImage-"]
! social junk
discord.com##[class^="socialLinks-"]
! nitro image
discord.com##[class^="marketingLogoImage-"]
! nitro background?
discord.com##[class^="guildHeaderBackground-"]
! useless settings tabs
discord.com##[class^="side-"] > [class^="item-"]:has-text(Billing)
discord.com##[class^="side-"] > [class^="item-"]:has-text(Subscriptions)
discord.com##[class^="side-"] > [class^="item-"]:has-text(HypeSquad)
discord.com##[class^="side-"] > [class^="item-"]:has-text(Server Boost)
discord.com##[class^="side-"] > [class^="item-"]:has-text(Gift Inventory)
discord.com##[class^="side-"] > [class^="item-"]:has-text(Authorized Apps)
! discord.com##[class^="side-"] > [class^="item-"]:has-text(Connections)
discord.com##[class^="side-"] > [class^="item-"]:has-text(Streamer Mode)
discord.com##[class^="side-"] > [class^="separator-"]
! version info
discord.com##[class^="side-"] > [class^="info-"]
! star button on gifs
discord.com##[class^="gifFavoriteButton-"]
! no friends image
discord.com##[class^="friendsEmpty-"] [class^="image-"]
! misc things I don't want to sort right now.
discord.com##[class^="qrLogin-"]
discord.com##[class^="embedFooterIcon-"]
discord.com##[class^="stars-"]
discord.com##div[aria-label^="Create Invite"]
! hide voice channels, TODO better filter
! discord.com##div[aria-label*=" (voice channel)"]
! nitro / hypesquad / etc badges
discord.com##div[class^="profileBadge-"]
! discord bot tags, because discord changed them up for the 6th time
discord.com##[class^="botTag-"]
discord.com##[class^="botTagCozy-"]
discord.com##[class^="botTagRegular-"]
discord.com##[class^="botTagCompact-"]
discord.com##[class^="bot-"]
! 05/22/2020 - yet another new tag. stop.
discord.com##[class^="headerBotTagWithNickname-"]
! 07/07/2022 - bot tag
discord.com##[class^="headerBotTag-"]
! discord bot "add to server" button
discord.com##[class^="applicationInstallButton-"]
! hide members from the member list
! discord.com##[class^="member-"]:has-text(NICKNAME_GOES_HERE_NOQUOTES)
! hide channels (voice / text)
! discord.com##[class^="iconVisibility-"]:has-text(CHANNEL_NAME_GOES_HERE_NOQUOTES)
! store apps. TODO: Better filter?
discord.com##[href^="/store"]
! stages
discord.com##[href^="/discovery"]
! threads
discord.com###channel-attach-THREAD
! stupid emoji stuff they added for no reason :))))))))))))
! get rid of the stupid emoji details menu on click
discord.com##[class^="emojiSection-"]
! get rid of "click here to learn more" nitro ad for emojis (bad way)
discord.com##[class^="size14-"]:has-text(Click to learn more)
! stickers
discord.com##[class^="stickerIcon-"]
discord.com##[class^="clickableSticker-"]
! random misc garbage
! loading screen
||discord.com/assets/ffac5bb3fb919ce8bf7137d79e9defc9.mp4
! block avatars (uncomment)
!||cdn.discordapp.com/avatars/*
!discord.com##[class^="avatar-"]
! block audio (notification sounds and earrape ddr "help" menu) (uncomment)
! ||discord.com/assets/*.mp3
! gif junk
discord.com##[class^="upsellCard-"]
discord.com##[class^="gifGrid-"]
! I forget
discord.com##[class^="welcomeCTA-"]
! more nitro shilling
discord.com##[class^="premiumInlineNotice-"]
! new member leaf
discord.com##[class^="newMemberBadge-"]
! boosting button in chat box beside emoji
discord.com##button[aria-label^="Boost this server"]
! activity in chat box beside emoji
discord.com##button[aria-label^="Start an Activity"]
! EXPERIMENTAL, DISABLED BY DEFAULT:
! disable all right side chat buttons (including emoji)
! discord.com##[class^="channelTextArea"] > [class^="scrollableContainer-"] > [class^="inner-"] > [class^="buttons-"]
! emoji, ping, misc autocomplete
! discord.com##[class^="autocomplete-"]
! "xxx is typing..." indcator. 04/25/2022 PTB it causes the whole chat window to shift up by a few pixels any time it shows up. unfortunately also blocks slowmode timer.
discord.com##[class^="typing-"]
! 08/22/2022 - slash command and "upload message as file" attachment buttons
discord.com###channel-attach-SLASH_COMMAND
discord.com###channel-attach-upload-text-as-file
! 08/22/2022 - misc changes I forgot to commit or sort.
!discord.com##.artContainer-1EdHbR
!discord.com##.premiumSubscribeButton-3TowJw
!discord.com##.bannerNitroUpsell-1aRyq0
!discord.com##.gifIconContainer-3OM7ph
!discord.com##.wumpus-1nZlIc
!discord.com##.nitroUpsellButtonInner-1jfVee
@WAZAAAAA0
Copy link

fuck circle avatars all my homies hate circle avatars

/* DISCORD SQUARE AVATARS (for Stylus) */
.wrapper-3t9DeA foreignObject
{
    -webkit-mask: unset;
    mask: unset;
}
.avatar-large, .avatar-profile, .avatar-small, .avatar-xlarge, .avatar-xsmall, .avatar-xxlarge, .avatar-1BDn8e, .imageWrapper-2p5ogY, .image-33JSyf, .inner-1W0Bkn, .wrapper-2F3Zv8
{border-radius: unset;}

@K4sum1
Copy link

K4sum1 commented Feb 21, 2021

Does this make Discord faster with Firefox?

@Poliwrath
Copy link
Author

Poliwrath commented May 14, 2021

Not at all. Discord intentionally makes performance ass on Firefox. Disabling the markdown preview while you type feature does improve a bit, but who knows how long they'll keep that as an OPTION.

If anyone cares enough to change the colours back to what they were, be my guest. Discord's a shitty company and constantly changing every few months for no reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment