Disable CloudFlare Rocket loader on dark mode script #1045
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If it's enabled, then the initialization of the dark mode does not occur early enough, and the page will flash from light-to-dark if that was the saved theme.
See the CloudFlare documentation for details:
https://support.cloudflare.com/hc/en-us/articles/200168056-Understanding-Rocket-Loader
Fixes #959
I've temporarily added this on https://matplotlib.org so you can see that this is working. It is not added on any other page, which you can use for comparison.