-
-
Save TheSunCat/58fedaa19d6154ef3e4b2b676c286906 to your computer and use it in GitHub Desktop.
/** | |
* @name Adblock for Discord | |
* @author TheSunCat and contributors | |
* @version 1.0.0 | |
* @description We have moved to Codeberg! Follow the link below: | |
* @source https://codeberg.org/AllPurposeMat/Disblock-Origin | |
*/ | |
#app-mount::before { | |
content: "The Disblock Origin theme has moved to Codeberg! Please check https://codeberg.org/AllPurposeMat/Disblock-Origin"; | |
font-size: 1.25rem; | |
background-color: #dc8a78; | |
padding: 1rem; | |
} |
Thanks @LockBlock-dev, implemented both suggestions. Unlike the Nitro badge, I decided to hide the Quests one entirely as I can't think of a reason to have it enabled besides serving as another ad (unlike the Nitro ones which I would want to see for the same reason as people who pay for checkmarks on Twitter want to hide them).
@LavenderAndChamomile I found a more reliable way to block both the Nitro and Shop tabs, could you try it again?
Where do you see this panel @Kupie ? I see a similar-looking one in the friends list, but it is labeled as "Active Now" and has no settings icon. That one does look selectable via nowPlayingColumn
.
@TheSunCat not really that important but just checking, did you mix up lines 31 and 33?
Edit: also it seems the boost progress bar has slightly changed with the latest update. I've managed to get it work by adding an li
element as below.
Before:
ul[aria-label="Channels"] > div[role="button"][class^="container"] { display: none; }
After:
ul[aria-label="Channels"] > li > div[role="button"][class^="container"] { display: none; }
Hey, I love the work. I was wondering: would a mobile version of this adblock "theme" be available in the future for the mobile clients (i.e., Bunny)?
Yes @peldas, nicely spotted. Fixed the boost bar blocking and swapped the erroneous lines.
@Krolul I'd like to see this, too! Unfortunately it's a very different process to make something like this for a native app. The Discord "desktop" app is just a simple wrapper around a website, which makes it quite powerfully themable via CSS. The mobile app is an actual real app, so the tooling is entirely different. A whole separate project would be needed.
Hey, I love the work. I was wondering: would a mobile version of this adblock "theme" be available in the future for the mobile clients (i.e., Bunny)?
Look for "bluecord" via Google. I use it myself with Discord on my phone.
I made some improvements on this css:
https://gist.github.com/Rupurudu/d77fbf849129c818febbb06e5b1c7912
[Text Chat][Textarea] Now hides gift Nitro icon on non-english languages.
[Settings][Sidebar] Now hides Nitro tabs on non-english languages.
[Settings][Profiles] Per server avatar is no longer clickable (shows Nitro upsell)
[Settings][Voice & Video] Soundboard entrance sounds no longer hides Soundboard volume slider.
[Settings][Appearance] Nitro app icons no longer hidden if user has FakeNitro enabled.
[Settings][Appearance] Nitro themes no longer hidden if user has FakeNitro enabled.
[Server settings] Show Nitro progress bar switch and unlocked features.
[Voice Chat][Screen Share] Hide Screen Share also hides upsell banner.
[Toolbar] Hide Help button works on non-english languages.
Emoji popout: "Get nitro" button breaks Nitro tab fixed.
Great stuff! Thanks for sharing. Would you like it merged into here?
Yeah why not
any way to put this in stylus, so that i dont have to update it manually? i tried it like this but didnt work.
@import url('https://gist.githubusercontent.com/TheSunCat/58fedaa19d6154ef3e4b2b676c286906/raw/3c81548d365da4a453112ddafbae4d434b8c6e91/DisblockOrigin.theme.css')
any way to put this in stylus, so that i dont have to update it manually? i tried it like this but didnt work.
@import url('https://gist.githubusercontent.com/TheSunCat/58fedaa19d6154ef3e4b2b676c286906/raw/3c81548d365da4a453112ddafbae4d434b8c6e91/DisblockOrigin.theme.css')
You can try it like that:
https://gist.githubusercontent.com/TheSunCat/58fedaa19d6154ef3e4b2b676c286906/raw/DisblockOrigin.theme.css
This way it should auto update
Discord new profile popout changed some tags:
- Quest badge here:
-a[aria-label^="Completed a Quest"] { display: none; }
+div[aria-label^="Completed a Quest"] { display: none; }
- Nitro badges here:
-a[aria-label^="Subscriber since"], a[aria-label^="Early Supporter"] { display: none; }
+div[aria-label^="Subscriber since"], div[aria-label^="Early Supporter"] { display: none; }
-a[aria-label^="Server boosting since"] { display: none; }
+div[aria-label^="Server boosting since"] { display: none; }
Thanks! Applied.
Did you mean to revert line 152? I think it needs the li
there to hide the progress bar, at least on my client.
Not sure whether or not you want to block this thing:
Here's the style:
/* Emoji picker "Enable Super Reactions" button */
div:has(> div[aria-label="Enable Super Reactions"]) { display: none; }
Also, would it be possible to have this be a UserCSS (.user.css) file, or have some sort of mirror in that format? And even with Stylus' CSP patching, @import
ing the raw URL doesn't work for me.
Stickers are hidden by default because it shows an ad. If you are using a client mod you can comment out the line responsible for hiding the stickers tab.
Indeed. You can also always bring up the stickers input box by hitting Ctrl+S.
Not sure whether or not you want to block this thing
@gBasil It is blocked on my end, unless you are seeing it elsewhere than the emoji picker popup?
Can we do something about this? For me, it only randomly appears.
@floriegl Hrm, it looks different on my end, so your CSS doesn't block it. Do you think we should wait for the ad to become consistent or find a way to block both now? With some quick poking I haven't found a way to consistently target my version of that upsell.
Also, would it be possible to have this be a UserCSS (.user.css) file, or have some sort of mirror in that format? And even with Stylus' CSP patching, @importing the raw URL doesn't work for me.
I've long wanted to move this to a proper repo on my own forge (https://git.allpurposem.at ) where I can have more/proper control over its distribution and do stuff like that. However I don't want this project to become less accessible because of it (I'd have to enable public sign-ups I guess). Another option would be to host a proper repo on an existing public free forge such as Codeberg or Sourcehut.
I am open to any ideas to get this out of GitHub in a way that is most accessible for everyone, please feel free to suggest things.
It is blocked on my end, unless you are seeing it elsewhere than the emoji picker popup?
I re-pasted the script and it seems to work now. Thanks!
feel free to suggest things
I'll vote for Codeberg. Sourcehut is quite obtuse to use for those who aren't familiar with it.
Do you think we should wait for the ad to become consistent or find a way to block both now? With some quick poking I haven't found a way to consistently target my version of that upsell.
Yeah, a friend of mine now also got a similar one:
div[class*="overlayBackground_"]:has(div[class*="contentText_"] > a[role="button"])
would be my best guess for that. But yeah, they got really annoying with that.
Do you think we should wait for the ad to become consistent or find a way to block both now? With some quick poking I haven't found a way to consistently target my version of that upsell.
Yeah, a friend of mine now also got a similar one:
div[class*="overlayBackground_"]:has(div[class*="contentText_"] > a[role="button"])
would be my best guess for that. But yeah, they got really annoying with that.
This selector does the trick on my end 👍
It can be added at the end of the "Hide Nitro upsells" category like so:
/* Friend overlay nitro upsell */
div[class*="overlayBackground_"]:has(div[class*="contentText_"] > a[role="button"]) { display: none; }
Thanks for the report, I've gotten rid of the header hiding bit since it keeps breaking and technically there's still the Gift Inventory
button. The changes are live on the Codeberg repo.
I've finished transitioning the repo to Codeberg, and you can now find it here: https://codeberg.org/AllPurposeMat/Disblock-Origin
Please be welcomed to continue discussion in an issue there!
The last version of the theme on GitHub disables the functionality and displays an orange banner explaining where it went. I know it's annoying to have to move, but using a real repo gives many benefits such as being able to use an issue tracker, commit names, and a proper readme file, and I've wanted to do this for a while.
The reason for picking Codeberg over GitHub is that Codeberg is a free forge, whereas GitHub has been making decisions (especially recently) that go against software freedom. Principally, I do not consent to an AI/LLM such as Copilot being trained on what I write and sold, laundering my code's license along the way. You can read more about reasons to leave GitHub at GiveUpGitHub.org
Hi! I moved the project to Codeberg. There's a merge request open to perhaps hide this, you are welcome to join the discussion: https://codeberg.org/AllPurposeMat/Disblock-Origin/pulls/4
Hi! I moved the project to Codeberg. There's a merge request open to perhaps hide this, you are welcome to join the discussion: https://codeberg.org/AllPurposeMat/Disblock-Origin/pulls/4
Ok, thank you and will do!
I'm using British English