Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stylesheet processor misses background on pixiv's dark theme unless you do a cached reload (i.e. NOT a Ctrl+F5) #5

Open
NintendoManiac64 opened this issue May 25, 2022 · 2 comments
Labels
Bug Something isn't working Stylesheet Processor This issue involves the component that rewrites stylesheets.

Comments

@NintendoManiac64
Copy link

NintendoManiac64 commented May 25, 2022

This was tested with a completely new copy of Pale Moon portable 31.0.0

And for reference, in order to even access pixiv nowadays, you must first have "dom.webcomponents.enabled" set to 'true' in Pale Moon's about:config. From there, in order to enable pixiv's dark theme, you must be signed into an account on pixiv and then manually enable the dark theme by toggling the according switch in the drop-down menu that appears when you click your profile picture located in the top-right of any pixiv page.

 

Anyway, the issue is quite simple. If your pixiv account is set to use the dark theme then, whenever you first visit a non-cached page (e.g. the first time you navigate to an artist pixiv page), swarth's stylesheet processor won't fully "kick-in" and will miss processing the background unless you manually reload the page a second time. You can tell if this is the case because pixiv's default dark theme uses a dark-ish grey background while swarth by default uses a full-on black background (interestingly, it seems that swarth's colors for text and links are still correctly applied no matter what).

That being said, you can still reliably make swarth's stylesheet processor fail to activate by simply doing a complete uncached reload of the artist's page via Ctrl+F5 (or holding shift while clicking the GUI reload button).

I tested this using the following page, though it seems to occur with any artist:

@NintendoManiac64 NintendoManiac64 changed the title Stylesheet processor doesn't "kick in" on pixiv's dark theme unless you do a cached reload (i.e. NOT a Ctrl+F5) Stylesheet processor doesn't fully "kick in" on pixiv's dark theme unless you do a cached reload (i.e. NOT a Ctrl+F5) May 25, 2022
@NintendoManiac64 NintendoManiac64 changed the title Stylesheet processor doesn't fully "kick in" on pixiv's dark theme unless you do a cached reload (i.e. NOT a Ctrl+F5) Stylesheet processor misses background on pixiv's dark theme unless you do a cached reload (i.e. NOT a Ctrl+F5) May 25, 2022
@fofajardo
Copy link
Member

fofajardo commented Jun 28, 2022

I'm not sure if there is anything actionable on the extension-side since this involves WebComponents, which changes a lot in terms of how style sheets are handled and processed. I'm guessing that there might be a race condition.

@fofajardo fofajardo added the Bug Something isn't working label Jun 28, 2022
@fofajardo fofajardo added the Stylesheet Processor This issue involves the component that rewrites stylesheets. label Aug 11, 2022
@fofajardo
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Stylesheet Processor This issue involves the component that rewrites stylesheets.
Projects
None yet
Development

No branches or pull requests

2 participants