kiwix / kiwix-js-pwa

Kiwix JS Offline Browser implemented as a Progressive Web App (PWA), and packaged as Electron, NWJS and UWP apps for Windows and Linux.
https://pwa.kiwix.org
GNU General Public License v3.0
177 stars 29 forks source link

Flash of incorrect style when loading Zimit ZIMs with DarkReader or when using the random button #514

Open Jaifroid opened 8 months ago

Jaifroid commented 8 months ago

While I have eliminated FOIS when using links within a loaded ZIM that has DarkReader enabled, incorrect style is still showing in the following circumstances:

These are minor issues, and it is a matter of porting the code that waits for DarkReader to have installed itself before showing the contents of the iframe, but it should be done for aesthetic reasons (and, marginally as an a11y issue).

Jaifroid commented 7 months ago

FOIS now affects most Zimit v2 ZIMs with DarkReader. The reason is because these ZIMs are faster to read (due to the pre-processing). It is difficult to detect when DarkReader has completed its transformations (this is some time after the enabled flag is set), so we have to introduce more time-based delay.