Closed ShalokShalom closed 7 years ago
Hi @ShalokShalom!
I don't think there is much we can do about this difference. The userscript is executed after the userscript engine determines if it needs to be run, then the script checks and injects the stylesheet. Whereas Stylus/Stylish can almost immediately inject the stylesheet on document start.
It might also help to move the userscript near the top of the order. Tampermonkey allows you to manually sort the order. I haven't used Violent Monkey so I don't know if it also allows you to sort.
This makes the script basically pointless to me, since i always get flashed by that white screen again.
The same delay can be seen with anything that loads via a web extension content script (like Stylus styles, see https://github.com/openstyles/stylus/issues/93).
The only advice I can give is to check if the delay is still there with a fresh browser profile and just one script active. This is more of a architectural issue with web extensions in general where addon scripts cannot really block the rendering of the page, so must load as fast as possible. If one script hogs too much CPU during page load, other scripts might be delayed which cause the flash.
I dont see this change with Stylus.
It happens also with only Github Dark Script actived.
i get here a delay, when it comes to the loading of the theme, which results in bright screens between the switches, which counteracted the sense of this thing