One thing that will help with implementing some wanted features, like being able to disable and enable certain color combos, is to maintain a constants file. With that, you can have a single reference to the color combination names that can be used both in the popup.js and content_script.js.
For the popup.html, we can simply use the built in import/export module system, but the content_script.js file does not have access to this (since it's an injected js file, and not an html file).
If you are willing to use a bundler, which one? Browserify? Webpack? Rollup? Something else?
Are you willing to use a Bundler for development?
One thing that will help with implementing some wanted features, like being able to disable and enable certain color combos, is to maintain a constants file. With that, you can have a single reference to the color combination names that can be used both in the
popup.js
andcontent_script.js
.For the
popup.html
, we can simply use the built inimport/export
module system, but thecontent_script.js
file does not have access to this (since it's an injected js file, and not an html file).If you are willing to use a bundler, which one? Browserify? Webpack? Rollup? Something else?