openstyles / stylus

Stylus - Userstyles Manager
https://add0n.com/stylus.html
GNU General Public License v3.0
5.44k stars 304 forks source link

(Firefox) "patch CSP" doesn't work on mobile – how to debug? #1799

Closed j12i closed 3 months ago

j12i commented 3 months ago

First, let me state my usecase. I have a web app that I use daily on Android/Mull. All I want to do is change the font to something more eye-friendly. I have a userstyle that does that on desktop Firefox, loading a font I host myself on the web. In order for it to work, I had to toggle the "patch CSP" switch in Stylus settings.

But on Android the switch doesn't seem to work. I went through the hassle of getting remote debugging to work, only to see that the problem was indeed Content-Security-Policy. I have tried with all other addons disabled.

Do you have any hints how I could debug that or even make it work? Thanks for reading.

tophf commented 3 months ago

Sounds like a bug in mobile Gecko/Firefox's implementation of webRequestBlocking, so I don't think there's anything we can do about it.

tophf commented 3 months ago

There's an alternative API (declarativeNetRequest), but it doesn't allow patching the CSP, it can only remove it or replace with a new value. We'll have to use it for the stinky ManifestV3 anyway, so maybe it will work in mobile...

j12i commented 3 months ago

Thank you. That's a shame.