CodeNewbie Community 🌱

Kasi21
Kasi21

Posted on

Building chrome extension. Help understanding service workers.

Hi all,

Can anyone point me to any resources for how to implement service workers for chrome extensions using manifest 3.0 (or show me with the attached code)?

This is my first coding project and I'm trying to figure out how to inject one of two different CSS files (main.css or main2.css) based on the state (1/0) of a button in popup.html.

For reference, I'm a quick learner, but a beginner.

Here's a link to the GitHub with the code: https://github.com/Kasi21/ChromeBackground

Thanks in advance!

Kas

Latest comments (1)

Collapse
 
terabytetiger profile image
Tyler V. (he/him)

Instead of having 2 CSS files could you instead change the CSS with JavaScript on change of the checkbox?