├── LICENSE ├── README.md ├── adblock-extras.css ├── adblock.css ├── media ├── demo.png ├── jksdqfhjkldh.svg └── logo.svg └── tweak.css /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 ImNotUsingVape 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | Logo 3 |

4 |

Discord AdBlock

5 |

The ads for Discord Nitro bother you, you can now delete them

6 |

7 | 8 | --- 9 | 10 | Main adblock list for Nitro ads: 11 | ```css 12 | @import url(https://croissantdunord.github.io/discord-adblock/adblock.css); 13 | ``` 14 | 15 | Extra adblock list to remove profile customisations and Nitro-related badges: 16 | (Alternatively, consider opening adblock-extras.css to only pick the elements that you want to remove.) 17 | ```css 18 | @import url(https://croissantdunord.github.io/discord-adblock/adblock-extras.css); 19 | ``` 20 | 21 | [](https://raw.githubusercontent.com/CroissantDuNord/discord-adblock/main/adblock.css) 22 | [](https://raw.githubusercontent.com/CroissantDuNord/discord-adblock/main/adblock.css) 23 | 24 | --- 25 | ## 🛡️ Main list 26 | The main rule list that remove nitro ads and features that require nitro. 27 | - [x] Ads in profile tabs. 28 | - [x] Ads in the settings menus. 29 | - [x] Upsells in free features (screen sharing, etc.) 30 | - [x] Full screen ads. 31 | - [x] Banner ads. 32 | - [x] Store and nitro buttons. 33 | - [x] Gift button. 34 | - [x] Server boost elements. 35 | - [x] Super reaction elements. 36 | - [x] Message limit warning. 37 | - [x] App launcher icons. 38 | - [x] Seasonal nitro nags. 39 | --- 40 | ## 🛡️ Extras list 41 | A very opinionated list with CSS rules that can remove various annoyances and superfluous gimmicks. 42 | It's recommended you look inside adblock-extras.css to pick only the elements you want to block specifically. 43 | - [x] All Nitro profile customisations (Avatar frames, effects, etc.) 44 | - [x] Profile badges. 45 | - [x] Server boost elements. 46 | - [x] Activity list in guild members list. 47 | - [x] Forward button in message hoverbar. 48 | - [x] Discover button. 49 | - [x] Soundmoji. 50 | --- 51 | 52 | ## ❓ Installation Guide 53 | 54 | 1. You need a client mod (Like [BetterDiscord](https://betterdiscord.app/) or [Vencord (Recommended)](https://vencord.dev)) 55 | 56 | - **BetterDiscord:** 57 | Open the CustomCSS Tab in the user settings 58 | - **Vencord:** 59 | Open settings, choose "Vencord", then "Edit QuickCSS" 60 | 61 | 2. Copy & Paste this CSS into the Custom CSS input *(This will load adblock.css from here, this mean that it will auto-update from this repo)* 62 | 63 | For main adblock: 64 | ```css 65 | @import url("https://croissantdunord.github.io/discord-adblock/adblock.css"); 66 | ``` 67 | - (Optional) For **ALL** the extras, add this as well on a new line: 68 | ```css 69 | @import url("https://croissantdunord.github.io/discord-adblock/adblock-extras.css"); 70 | ``` 71 | 72 | ![image](https://github.com/CroissantDuNord/discord-adblock/assets/79372025/a5cef664-6bf4-4740-bed7-b66a22b735dc) 73 | 74 | 3. Done. Enjoy a slightly less frustrating Discord experience. 👍 75 | 76 | ## Issues or suggestions 77 | 78 | You can report any problems and suggest ideas by [opening an issue](https://github.com/CroissantDuNord/discord-adblock/issues). 79 | 80 | -------------------------------------------------------------------------------- /adblock-extras.css: -------------------------------------------------------------------------------- 1 | /* ==UserStyle== 2 | @name Discord AdBlock Extras 3 | @namespace https://github.com/CroissantDuNord/discord-adblock 4 | @version 1.0.0 5 | @description Removes extra Nitro-related objects from Discord that do not explicitly count as advertising. 6 | @author Ridge & contributors 7 | ==/UserStyle== */ 8 | 9 | /* It is highly recommended you manually import the rules you want from this file, rather than using the entire list. */ 10 | /* This is a highly opinionated collection of rules that remove clutter from the client, that some might find useful or desirable. */ 11 | 12 | /* Avatar decorations */ 13 | svg[class*=avatarDecoration_] { 14 | display: none; 15 | } 16 | img[class*=avatarDecoration_] { 17 | display: none; 18 | } 19 | 20 | /* Profile decorations */ 21 | div[class*=profileEffects] { 22 | display: none; 23 | } 24 | div[class*=userProfileModalInner]>header>svg>foreignObject>div[class*=bannerPremium] { 25 | display: none; 26 | } 27 | 28 | /* Server booster icon */ 29 | svg[class*=premiumIcon_] { 30 | display: none; 31 | } 32 | 33 | /* Server boost progress bar */ 34 | ul > li:has(div[data-list-item-id*=channels___boosts-]) { 35 | display: none; 36 | } 37 | 38 | /* Nitro Icon Sever */ 39 | div[class^=guildIconContainer_]:has(svg[class^=boostedGuildIconGem_]) { 40 | display: none; 41 | } 42 | 43 | /* Quests icon */ 44 | svg[class^=questsIcon_] { 45 | display: none; 46 | } 47 | 48 | /* "Quest Completed" badge in profiles */ 49 | div:has(> a[href="https://discord.com/discovery/quests"]) { 50 | display: none; 51 | } 52 | 53 | /* "Nitro" and "Server Boosting" badges in profiles */ 54 | div:has(> a[href="https://discord.com/settings/premium"]) { 55 | display: none; 56 | } 57 | 58 | /* "Hype Squad" badge in profiles */ 59 | div:has(> a[href="https://discord.com/settings/hypesquad-online"]) { 60 | display: none; 61 | } 62 | 63 | /* Activity list */ 64 | h3[class^=membersGroup_]:has(span[role="button"]) { 65 | display: none; 66 | } 67 | div[class^=container_] > aside[class^=membersWrap_] > div[class^=members_] > div[role^=list] > div:has(div[class*="openOnHover_"]) { 68 | display: none; 69 | } 70 | 71 | /* "Forward" hover bar button */ 72 | div[class^=hoverBarButton_][aria-label=Forward] { 73 | display: none; 74 | } 75 | 76 | /* "Events" button at the top of channel list */ 77 | #channels > ul > li:has([id^=upcoming-events-]), 78 | #channels > ul > li:has([id^=upcoming-events-]) + [class^=sectionDivider_] { 79 | display: none; 80 | } 81 | 82 | /* "Discover" footer on the left sidebar */ 83 | div[class^=footer_]:has(div[data-list-item-id="guildsnav___guild-discover-button"]) { 84 | display: none; 85 | } 86 | /* "Discover" button in the new design */ 87 | div[class^=itemsContainer_] > div[class^=stack_] > div[class^=listItem_]:has(div[data-list-item-id=guildsnav___guild-discover-button]) { 88 | display: none; 89 | } 90 | 91 | /* Soundmoji */ 92 | div[class^=categorySection_]:has(div[class^=soundmojiViewMore_]) { 93 | display: none; 94 | } 95 | #soundboard-picker-tab { 96 | display: none; 97 | } 98 | div[class^="categoryItemDefaultCategory_"]:has(path[d="M14.24 1.03a1 1 0 0 1 .73 1.21l-1 4a1 1 0 0 1-1.94-.48l1-4a1 1 0 0 1 1.21-.73ZM20.7 4.7a1 1 0 0 0-1.4-1.4l-4 4a1 1 0 0 0 1.4 1.4l4-4Z"]+path[d="M15.14 20.14c1.78-1.78.7-5.75-2.42-8.86-3.11-3.12-7.08-4.2-8.86-2.42A3.13 3.13 0 0 0 3 11V11l-1.16 8.92a2 2 0 0 0 2.24 2.24L13 21c.86-.04 1.6-.32 2.14-.86Zm-1.3-3.4a9.61 9.61 0 0 0-2.53-4.05 9.61 9.61 0 0 0-4.05-2.53c-1.27-.35-1.82-.05-1.99.11-.16.17-.46.72-.11 2a9.61 9.61 0 0 0 2.53 4.04 9.61 9.61 0 0 0 4.05 2.53c1.27.35 1.82.05 1.99-.11.16-.17.46-.72.11-2Z"]+path[d="M7.05 3.32a1 1 0 0 1 1.9-.64l1 3a1 1 0 1 1-1.9.64l-1-3ZM22.97 9.76a1 1 0 0 0-1.21-.73l-4 1a1 1 0 1 0 .48 1.94l4-1a1 1 0 0 0 .73-1.21ZM20.68 16.95a1 1 0 0 0 .64-1.9l-3-1a1 1 0 0 0-.64 1.9l3 1Z"]) { 99 | display: none; 100 | } 101 | 102 | /* Nameplate */ 103 | div[class^="member__"] > div[class*="nameplated__"] > div[class^="container__"]:has(div[class^="videoContainer__"]) { 104 | display: none; 105 | } 106 | 107 | /* Clan badges in guild user list */ 108 | [class*="chipletContainerInner_"]:has([src*="/clan-badges/"]) { 109 | display: none; 110 | } 111 | 112 | /* Community badge/tag thing */ 113 | span[class^="chipletContainerInner__"]:has(img[class^="badge__"]) { 114 | display: none; 115 | } 116 | -------------------------------------------------------------------------------- /adblock.css: -------------------------------------------------------------------------------- 1 | /* ==UserStyle== 2 | @name Discord AdBlock 3 | @namespace https://github.com/CroissantDuNord/discord-adblock 4 | @version 1.0.0 5 | @description Removes annoying Nitro upsells from Discord. 6 | @author CroissantDuNord & contributors 7 | ==/UserStyle== */ 8 | 9 | /* Temporary: Spring 2025 Fullscreen Nitro ad */ 10 | div[class^=layerContainer_]:has(img[src="//cdn.discordapp.com/promotions/premium-marketing/1339699795819892826/1346282189033181216.gif"]) { 11 | display: none; 12 | } 13 | 14 | /* Fullscreen Nitro trial ad */ 15 | div[class^=layerContainer_]:has(div[class*="freeTrialPillWithSparkles_"]) { 16 | display: none; 17 | } 18 | 19 | /* Hide Nitro quality selectors and upsell */ 20 | div[class^="qualitySettingsContainer_"] > div > div > div > div> button[class*=premiumUpsell] { 21 | display: none; 22 | } 23 | div[class^="qualitySettingsContainer_"] > div[class^=upsellBanner__] { 24 | display: none; 25 | } 26 | 27 | /* Chat view blocks */ 28 | /* App launcher icons (chat box, guild menu, AI apps on image hover) */ 29 | div[class^=channelAppLauncher_] { 30 | display: none !important; 31 | } 32 | div[class^="jumpToPresentBar_"] { 33 | right: 16px; 34 | } 35 | div[id="guild-header-popout-application-directory"] { 36 | display: none; 37 | } 38 | div[class^=hoverButton_]:has(g[transform="matrix(2.700000047683716,0,0,2.700000047683716,-79.60000610351562,-81.35110473632812)"]) { 39 | display: none; 40 | } 41 | 42 | /* Store tab */ 43 | li[class^=channel_]:has(a[href="/shop"]) { 44 | display: none; 45 | } 46 | 47 | /* Nitro tab */ 48 | li[class^=channel_]:has(a[href="/store"]) { 49 | display: none; 50 | } 51 | 52 | /* Store popup ads */ 53 | [id^=popout]:has([class^=buttonContainerVertical]) { 54 | display:none; 55 | } 56 | 57 | /* Gift button */ 58 | div[class^=buttons__] button:has(path[d=" M-7,10 C-8.104999542236328,10 -9,9.104999542236328 -9,8 C-9,8 -9,2.5 -9,2.5 C-9,2.2239999771118164 -8.776000022888184,2 -8.5,2 C-8.5,2 -1.5,2 -1.5,2 C-1.2239999771118164,2 -1,2.2239999771118164 -1,2.5 C-1,2.5 -1,9.5 -1,9.5 C-1,9.776000022888184 -1.2239999771118164,10 -1.5,10 C-1.5,10 -7,10 -7,10z M1,9.5 C1,9.776000022888184 1.2239999771118164,10 1.5,10 C1.5,10 7,10 7,10 C8.104999542236328,10 9,9.104999542236328 9,8 C9,8 9,2.5 9,2.5 C9,2.2239999771118164 8.776000022888184,2 8.5,2 C8.5,2 1.5,2 1.5,2 C1.2239999771118164,2 1,2.2239999771118164 1,2.5 C1,2.5 1,9.5 1,9.5z"]) { 59 | display: none; 60 | } 61 | 62 | /* Super reactions -- Doesn't seem like these are being pushed on free users anymore. */ 63 | /* Leaving them as is, but raise an issue if they break normal reactions. */ 64 | #message-add-reaction-1 { 65 | display: none; 66 | } 67 | #message-actions-add-reaction-1 { 68 | display: none; 69 | } 70 | 71 | /* Settings pages */ 72 | /* Banner ads */ 73 | #profile-customization-tab>div:has(div[class*="artContainer"][role="presentation"]) { 74 | display: none; 75 | } 76 | #profile-customization-tab > div[class^=upsellContainer__] { 77 | display: none; 78 | } 79 | 80 | /* Avatar decoration settings */ 81 | #profile-customization-tab > div > div[class*=profileCustomizationSection_] > div[class*=baseLayout_] > div[class*=sectionsContainer_] > div[class*=customizationSection_]:nth-of-type(4) { 82 | display: none; 83 | } 84 | 85 | /* Profile effect settings */ 86 | #profile-customization-tab > div > div[class*=profileCustomizationSection_] > div[class*=baseLayout_] > div[class*=sectionsContainer_] > div[class*=customizationSection_]:nth-of-type(5) { 87 | display: none; 88 | } 89 | 90 | /* Profile Nitro preview */ 91 | #profile-customization-tab > div:has(div[class^=premiumFeatureBorder__]) { 92 | display: none; 93 | } 94 | 95 | /* "Try Nitro!" ad */ 96 | #profile-customization-tab > [class*=premiumFeatureBorder_] { 97 | display: none; 98 | } 99 | 100 | /* Server profiles upsell */ 101 | #profile-customization-tab > div > div[class*=profileCustomizationSection_] > div[class*=baseLayout_] > div[class*=sectionsContainer_] > div[class*=upsellOverlayContainer_] { 102 | display: none; 103 | } 104 | 105 | /* App colour */ 106 | #appearance-tab > div > div > div > div > div > div > div > section:has(svg[class*=nitroWheel_]) { 107 | display: none; 108 | } 109 | 110 | /* Icon Theme (just edit the .ico file) */ 111 | #appearance-tab > div > div div[class^=selectionGroup__]:has(svg[class*=nitroWheel_]) { 112 | display: none; 113 | } 114 | 115 | /* BOGO button in settings */ 116 | div[class^=premiumLabel_] > div[class^=badgeContainer_]:has(span[class*="star_"]) { 117 | display: none; 118 | } 119 | 120 | /* Billing info sidebar --- I've decided it's better to just leave this, it's not too intrusive. 121 | Blocking each element in the list is tedious and can break some client mods that add their own settings entries. 122 | If anyone knows a better way to block precisely the billing info settings, please make a PR :) */ 123 | 124 | /* 125 | #app-mount > div.appAsidePanelWrapper__714a6 > div.notAppAsidePanel__9d124 > div.app_b1f720 > div > div > div:nth-child(2) > div > div.sidebarRegion__60457 > div > nav > div > div.premiumTab__57bdc.item__48dda.themed_b957e8 { 126 | display: none 127 | } 128 | #app-mount > div.appAsidePanelWrapper__714a6 > div.notAppAsidePanel__9d124 > div.app_b1f720 > div > div > div > div.standardSidebarView__1129a > div.sidebarRegion__60457 > div.sidebarRegionScroller__1fa7e.thin_b1c063.scrollerBase_dc3aa9.fade_ba0fa0 > nav.sidebar__9e3e2 > div.side_b4b3f6 > div.separator_fdbcfd:nth-of-type(11) { 129 | display: none 130 | } 131 | #app-mount > div.appAsidePanelWrapper__714a6 > div.notAppAsidePanel__9d124 > div.app_b1f720 > div > div > div > div.standardSidebarView__1129a > div.sidebarRegion__60457 > div.sidebarRegionScroller__1fa7e.thin_b1c063.scrollerBase_dc3aa9.fade_ba0fa0 > nav.sidebar__9e3e2 > div.side_b4b3f6 > div.header_f72511:nth-of-type(12) { 132 | display: none 133 | } 134 | #app-mount > div.appAsidePanelWrapper__714a6 > div.notAppAsidePanel__9d124 > div.app_b1f720 > div > div > div > div.standardSidebarView__1129a > div.sidebarRegion__60457 > div.sidebarRegionScroller__1fa7e.thin_b1c063.scrollerBase_dc3aa9.fade_ba0fa0 > nav.sidebar__9e3e2 > div.side_b4b3f6 > div.themed_b957e8.item__48dda:nth-of-type(14) { 135 | display: none 136 | } 137 | #app-mount > div.appAsidePanelWrapper__714a6 > div.notAppAsidePanel__9d124 > div.app_b1f720 > div > div > div > div.standardSidebarView__1129a > div.sidebarRegion__60457 > div.sidebarRegionScroller__1fa7e.thin_b1c063.scrollerBase_dc3aa9.fade_ba0fa0 > nav.sidebar__9e3e2 > div.side_b4b3f6 > div.themed_b957e8.item__48dda:nth-of-type(15) { 138 | display: none 139 | } 140 | #app-mount > div.appAsidePanelWrapper__714a6 > div.notAppAsidePanel__9d124 > div.app_b1f720 > div > div > div > div.standardSidebarView__1129a > div.sidebarRegion__60457 > div.sidebarRegionScroller__1fa7e.thin_b1c063.scrollerBase_dc3aa9.fade_ba0fa0 > nav.sidebar__9e3e2 > div.side_b4b3f6 > div.themed_b957e8.item__48dda:nth-of-type(16) { 141 | display: none 142 | } 143 | #app-mount > div.appAsidePanelWrapper__714a6 > div.notAppAsidePanel__9d124 > div.app_b1f720 > div > div > div > div.standardSidebarView__1129a > div.sidebarRegion__60457 > div.sidebarRegionScroller__1fa7e.thin_b1c063.scrollerBase_dc3aa9.fade_ba0fa0 > nav.sidebar__9e3e2 > div.side_b4b3f6 > div.themed_b957e8.item__48dda:nth-of-type(17) { 144 | display: none 145 | } */ 146 | 147 | /* Guilds blocking */ 148 | /* Server boost button */ 149 | #guild-header-popout > div > div:nth-child(1), #guild-header-popout > div > div:nth-child(2) { 150 | display: none; 151 | } 152 | 153 | /* Custom Join Sound AD (No discord I dont want to play a random meme sound when I join a call)*/ 154 | #popout_4611 > div > div > div.gridNoticeWrapper__548b9 > div { 155 | display: none; 156 | } 157 | 158 | /* Hide upsell banner for messages that are too long */ 159 | div[class*=characterCount] > div[class*=upsell_] { 160 | display: none; 161 | } 162 | 163 | /* Hide message length Nitro "subscribe" button */ 164 | div[role=dialog] > div > div > div[class*=primaryActions_] > button:has(svg[class*=premiumIcon]) { 165 | display: none; 166 | } 167 | 168 | /* Desktop app ad */ 169 | [class^=notice_]:has(i[class^=iconApple]){ 170 | display:none; 171 | } 172 | 173 | /* You have X days left to try Nitro banner */ 174 | div[class^=base_] > div[class^=notice_]:has([class^=premiumIcon_]) { 175 | display: none; 176 | } 177 | 178 | /* Profile popup upsell */ 179 | div[class^="inner_"] > div[class^="body_"] > div[class^="upsellContainer_"] { 180 | display: none; 181 | } 182 | 183 | /* Try nitro and get avatar decorations banner */ 184 | div[class^=notice_][class*=colorPremium_] { 185 | display: none; 186 | } 187 | 188 | /* Bookmarks with Nitro popout */ 189 | div[id^=popout_]:has(div[class*="upsellTooltipWrapper__"]) { 190 | display: none; 191 | } 192 | 193 | /* Notification sounds setting */ 194 | div[id="user-context"] > div[class^="scroller_"] > div[role="group"] > div:has(div[id="user-context-notification-sounds"]) { 195 | display: none; 196 | } 197 | -------------------------------------------------------------------------------- /media/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CroissantDuNord/discord-adblock/c014dd9e7f05a35e5dff5662a353e3ae0857ace1/media/demo.png -------------------------------------------------------------------------------- /media/jksdqfhjkldh.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /media/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tweak.css: -------------------------------------------------------------------------------- 1 | @import url(https://raw.githubusercontent.com/CroissantDuNord/discord-adblock/main/adblock.css); 2 | --------------------------------------------------------------------------------