-
-
Notifications
You must be signed in to change notification settings - Fork 551
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
Update satus.js correct Menu load timing problems #2160 #2163
Conversation
Good day! :) Without loading the JS in the head, the later ones frequently aren't loaded or executed. (put CSS in the end on purpose too) ( We can remove the "overlay" in satus.js line 910 after callback(items); ) |
What do you mean? Can you reproduce a case of js not loading?
the sooner CSS is loaded the better, loading CSS late results in flashing colors if browser applies styles after showing html early.
the "problem" (if you can call additional 200ms that) is manipulating dom by adding overlay in the first place. There was never any need for removing it after menu loaded, it can stay there under the menu, its invisible anyway. |
#1803 maybe you saw the bug 1 or 2 years ago with not all of the red front screen buttons appearing. BTW just to make sure, hope you like the threads. Sometimes i might just add vague notes, but then i can accept PRs and change back something.
200ms is shocking.
👍 Removing anyways just felt clean/futureproof, since we are at it anyways. And might potentially stop the animation before it even started. Satus.js & ImprovedTube was(/will be) template for more extensions like https://chromewebstore.google.com/detail/unlock-keyboard-mouse/ijngdimmjkngoglcjaheoadciaalbafl, where we typically load fewer settings. |
it is! thats why I described how to masure so you can verify for yourself #2160 (comment) Line 21 in 7014a79
open extension popup, open devtools inside the popup and check the number in console before and after commenting out 5 lines (899-902, 910) patched out of satus.js in this patch. This measures total time taken by settings and locales being loaded. Its possible this only speeds up popup in Vivaldi for example (I dont use/test under ff/pure chrome), things like this should always be measured.
to remove it js has to run after id="overlay" is created. Browser executes js as soon as its loaded, thats why in the patch js files were moved below id="overlay". Edit: but this overlay is not needed in the first place after fixing timing issues. |
….js so it executed when document.body exist
62a36d2
to
40aedd4
Compare
should solve #2160