Dorion icon indicating copy to clipboard operation
Dorion copied to clipboard

[Bug][Inline CSS] Cannot apply/import CSS from raw.codeberg.page

Open mangkoran opened this issue 3 months ago • 6 comments

Describe the bug It seems Inline CSS cannot apply/import CSS from raw.codeberg.page. I tried with Disblock Origin (repo) but the CSS is not applied. It's working if I use the "proxied" CSS URL. I'm able to access both the raw.codeberg.page and proxied URL in my browser.

To Reproduce Steps to reproduce the behavior:

  1. Install Inline CSS in Dorion

  2. Import Disblock Origin CSS by adding it's raw.codeberg.page URL in Inline CSS

    @import url("https://raw.codeberg.page/AllPurposeMat/Disblock-Origin/DisblockOrigin.theme.css");
    

Expected behavior CSS from raw.codeberg.page imported and applied.

Screenshots Using raw.codeberg.page URL

Image

Using "proxied" CSS URL. Notice the "Disblock" logo below Discord version at bottom left.

Image

System Info (please complete the following information):

  • OS: Windows 10 IoT LTSC
  • Discord version: Stable 457174 (cb7c5ff)
  • Build Override: N/A
  • Any other relevant info:
    • Dorion: v6.11.0 (f08504b)

Additional context N/A

mangkoran avatar Oct 12 '25 03:10 mangkoran

It should give you logs in the devtools console if there is something preventing the file from loading. I would also recommend restarting Dorion once or twice, there is an infrequent issue where the CSP killer doesn't apply properly

SpikeHD avatar Oct 12 '25 03:10 SpikeHD

It should give you logs in the devtools console if there is something preventing the file from loading.

@SpikeHD Found one relevant logs.

Image Image

Edit: I couldn't reproduce the error above. However, after quite sometime, it seems the CSS is fetched successfully but the CSS is not applied as I'm still able to see Nitro-related elements.

Image Image

I noticed the status code is different if I use the proxied URL.

Image

I would also recommend restarting Dorion once or twice, there is an infrequent issue where the CSP killer doesn't apply properly

I have restarted, reloaded Dorion multiple times and it still doesn't work. It works with the proxied URL in first and every launch without restart/reload. So it seems the Codeberg domain might be blocked somewhere in the client. Related discussion https://codeberg.org/AllPurposeMat/Disblock-Origin/issues/80.

mangkoran avatar Oct 12 '25 05:10 mangkoran

Unlike Vencord, Dorion isn't choosy about which domains to keep in the CSP, so this isn't an intentional choice by Dorion. Try copy-pasting the contents of the CSS file into inline CSS and see if that helps perhaps? 🤷

SpikeHD avatar Oct 12 '25 15:10 SpikeHD

Try copy-pasting the contents of the CSS file into inline CSS and see if that helps perhaps?

If I copy-paste the CSS file directly it, well, works.

Image

But then I need to manually update the CSS every time the source is updated. And that's not what this issue is. I'm emphasizing why CSS from raw.codeberg.page URL doesn't work and not applied while CSS from the proxied URL works, as Dorion shouldn't block the raw.codeberg.page domain as you've said 😉

Could you reproduce this issue? It could be this issue only appears on my PC.

mangkoran avatar Oct 13 '25 00:10 mangkoran

Are other domains like raw.githubusercontent.com etc. also not working properly? Or just codeberg specifically? I can try reproducing at some point later.

SpikeHD avatar Oct 13 '25 00:10 SpikeHD

Are other domains like raw.githubusercontent.com etc. also not working properly? Or just codeberg specifically?

I tried with WildFyr16/Disblock-Origin-Lite and it doesn't work too (if it works there should be "Disblock" logo below Discord version at bottom left). So it seems raw.githubusercontent.com domain is also affected.

Image

mangkoran avatar Oct 13 '25 00:10 mangkoran