My WebExtension has options, such as "hide footer". Problem is that I can't manipulate DOM on document_start, because the <footer> doesn't exist yet. Injecting the code on document_end works, but the users still see the footer for a few seconds.
I have tried injecting CSS on <head> using document_start and it worked well. Now my question is:
- Since CSS won't always be the same, what would be the best way to inject CSS? Is there a JavaScript function to directly write CSS to
<style>, or should that be written manually using something such as innerHTML?