Loading Extra Files In Chrome Extensions

Many times when building chrome extensions, we’ve often found ourselves in situations where we have to add extra html to the web page. One way is to add the html on directly in the content_script js file, but I personally prefer not mixing up html and js in the same file. Also depending on the amount of html needed, it’s just be better to create a new html file for that purpose and then find a way to bring it into the content script. To do this, first we need to create the file and then add it to our manifest file as a web accessible resource. This allows the file to be usable in the context of a web page. Next if the file uses extra javascript or css files, we can add those in the content_script tag of our manifest file. This allows the css/js file be loaded ...(Read More)