Open emvaized opened 1 year ago
I agree, removing unnecessary DOMContentLoaded
, load
and TabOpen
listeners improves performance.
The script favicon_in_urlbar.uc.js
had a few other issues needed to be resolved, before uploading a new version.
During my testing of scripts
favicon_in_urlbar.uc.js
andtab_label_in_urlbar.uc.js
I figured out, thatDOMContentLoaded
,load
andTabOpen
event listeners are not really neccessary for scripts to function. Basically, 99% of cases are covered byTabAttrModified
event listener (if not all) — at least in the current Firefox version I tested (v115).Moreover, by removing
TabOpen
listener and adding a check to react only to selected tabs changes, scripts became significally easier on browser startup. Without these changes they processed whatever many tabs user had automatically restored on browser startup — each sending fewTabOpen
andTabAttrModified
events.I guess, the only downside is —
tab_label_in_urlbar.uc.js
will temporary show url in the label widget for new tabs which are still loading and don't have any label yet.