The structure of the chrome extension
There are a such a files:
manifest.json – file where we put some data like description, permissions, etc.
background.js – file that is constantly run when an extension is installed and on. It should be specified in manifest.json file
popup.html – this file is run when we click the button on the browser action panel. It should be specified in manifest.json
popup.js – we include this file by using <script></script> in the popup.html. It is used for UI that is in popup.html. There are event listeners that handle popup.html
option.html – each extension has an options page. It presents a UI.
option.js – this page includes in an option.html page by using <script></script>