CroissantDuNord / discord-adblock

Hide Ads For Discord Nitro, with CustomCSS
MIT License
47 stars 7 forks source link

[Fix Included!] Using `@import()` doesn't work in Better Discord #11

Closed steenburgh closed 11 months ago

steenburgh commented 11 months ago

TL;DR, try using this instead

@import url("https://steenburgh.github.io/discord-adblock/adblock.css");

The Issue

If you paste the @import() line from this repo's README in the Better Discord custom CSS window, the script doesn't load + an error shows up in the dev tools. Copy/pasting the full raw script in works. I suspect some recent change GitHub made broke this - possibly to prevent raw.githubusercontent.com/whatever from being used for web hosting. I haven't tested this with Venicord, but wouldn't be surprised if it has a similar issue if I'm right about the cause

image image

The Fix

I have a fix for this - I forked the repo + set up GitHub pages on the fork. Then I used the GitHub pages URL of the CSS file + this worked perfectly! I'd recommend the maintainer of this repo do the same :). https://github.com/steenburgh/discord-adblock

image image

CroissantDuNord commented 11 months ago

This could be Github making change strangely Vencord still support raw.githubusercontent.com, But if I say support for BetterDiscord I will so I switched to Github Pages.

https://croissantdunord.github.io/discord-adblock/adblock.css

nixRidge commented 11 months ago

Works a charm, I'm on BetterDiscord. Can close this I think.