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

Flashing of unstyled content (FOUC) #6

Open
3nly opened this issue Dec 18, 2024 · 6 comments
Open

Flashing of unstyled content (FOUC) #6

3nly opened this issue Dec 18, 2024 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@3nly
Copy link
Owner

3nly commented Dec 18, 2024

As per https://boards.4chan.org/g/thread/103525147#p103553843

is there any way to stop 4chanxt and stylechan from flashbanging me with an unthemed page before loading in my dark theme?

Native 4chan CSS loads (or fails to load) before StyleChan, if native theme colour mismatch with StyleChan theme you get "flashbanged" for a few milliseconds before the CSS applies.

Could set the 4chan cookie for sfw and nsfw themes to Tomorrow theme depending if theme is dark or not (with isLight function maybe). Part of this issue might be caused by adblockers blocking JS/CSS loading and slow connections/browsers. Don't see this too often on my side.

@gelebflamefinger
Copy link

I actually was able to solve this by tweaking some settings in Violentmonkey:

image

This completely fixed any unstyled pages from nuking my retinas. Would you recommend against this or is this fine to do?

@3nly
Copy link
Owner Author

3nly commented Dec 27, 2024

@inject-into should be set to auto, debatable if @run-at with document-body changes anything. In theory it should make the flashing worse since it needs to wait for the document body to show up.
I tried those settings but I don't notice much difference compared to the defaults, actually it seems to make the flashing a tad worse on Chrome.

Which browser are you using @gelebflamefinger ? If it works for you then I'm satisfied.

@3nly
Copy link
Owner Author

3nly commented Dec 27, 2024

People that have this problem should enable this option in Violentmonkey and see if it makes a difference:
Screenshot (1328)

@3nly 3nly added the help wanted Extra attention is needed label Dec 27, 2024
@3nly 3nly pinned this issue Dec 27, 2024
@3nly 3nly changed the title Flashbang when loading a page Flashing of unstyled content (FOUC) Dec 27, 2024
@3nly
Copy link
Owner Author

3nly commented Dec 29, 2024

accba45

@gelebflamefinger
Copy link

@3nly I am using Firefox. Seems to have completely fixed it for me.

@3nly
Copy link
Owner Author

3nly commented Dec 30, 2024

I've noticed a few bugs now that StyleChan is set to start at document-body, sometimes certain links don't get styled, particularly the Index and Catalog navigation links, but also this unusable StyleChan link appears at the bottom of the page, as here on /b/ with Chrome:

Screenshot 2024-12-30

Curiously it only happens in 4chan X, not XT.

@gelebflamefinger great to hear!

3nly added a commit that referenced this issue Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants