Skip to content
Advertisement

Chrome Extension content_script at both document_start and document_end

Good day to everyone, as you can see I’m pretty new at Chrome extensions.

Can you run a script from content_scripts before and after the the DOM or page fully loads?

Like:

JavaScript

Or something like:

JavaScript

Advertisement

Answer

You can have only one content_scripts entry, so it would be like:

JavaScript

With this setting, content1.js would run at the beginning and content2.js at the end.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement