Firefox plugin Stylus no longer working on Tildes
I have poor vision and I rely heavily on a Firefox plugin called Stylus to make websites readable - in particular the trend for low contrast and small text. That includes Tildes.
I updated it to v1.5.0 and now the styles I set for Tlldes no longer work - most other sites still appear to work but I've not checked them exhaustively.
I immediately tried rolling back a release or two (1.4.23 and 1.4.22) but those versions no longer work for any site. I tried randomly downgrading to even older versions but the same result. I think I'm stuck with the latest version..
I notice in the browser console there are 2 errors reported on Tildes e.g. on this page I see:
Content Security Policy: The page's settings blocked the loading of a resource at inline ("script-src"). new_topic:1:1
Content Security Policy: The page's settings blocked the loading of a resource at inline ("style-src"). new_topic:1:1
Using the Firefox Developer tools Inspector - I see my style settings for Tildes injected by Styuls (after the body) but they do not work any more.
Since only Tildes so far is not working with my Stylus settings I guess there is also a recent change to Tildes that is causing Stylus to fail.
This is a rather serious issue for me as all the colour options in the setting are low contrast and cause eye strain which becomes painful without the Stylus settings.
Thanks for any help you can offer.
Yeah, I just noticed the sudden breaking of my theme as well. Thought there might have been an update to the base themes that broke it, but nothing works at all. The CSP errors are the only new thing I noticed.
Probably a server configuration change, unfortunately.
Edit: CSP is now the following:
This prevents the inline styles being applied by Stylus. Definitely a configuration change.
The CSP hasn't changed significantly since the site launched. This is the file where it's defined: https://gitlab.com/tildes/tildes/blob/master/salt/salt/nginx/tildes.conf.jinja2#L46
And that file hasn't been touched since the open-source release over 4 months ago: https://gitlab.com/tildes/tildes/commits/master/salt/salt/nginx/tildes.conf.jinja2
So there must have been a change in Stylus or Firefox that's changed the behavior so that it no longer works on sites with restrictive CSPs (which Tildes's definitely is, but it always has been).
Thanks - I'll chase Stylus about the issue - I haven't changed anything else about Firefox only the plugin version.
Edit: For anyone else suffering - as a workaround.
I transferred all my Stylus settings for tildes.net to:
<FF profile path>/chrome/userContent.css
and that method works!That's strange. I'd never even updated Stylus.
Thanks for chiming in!
Update:
A fix has been added to Stylus - hopefully the next version works here again.
Nice, that's good. Please let me know if it ends up fixing it or not. Being able to support Stylus styles is important to me, so I'm willing to loosen the CSP if it ends up being necessary (but I'd prefer not to, if they can fix it).
Good news - Stylus v1.5.1 is working great with tildes once again!