Creating Firefox browser extensions for covid-19–4
Tags: javascript, showdev, webdev, beginners
Published: 2020-04-01 17:40:28

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/tzpxfsokz0huhuz6mgdz.jpeg)

Welcome to part-4 of the series. As, the title tells i will be creating some firefox extensions to help in the covid-19 crisis. Since, there are already some good sites which are helping us to track the infection, i decided to build some extensions.

As all of us know that how important to wash our hands in this crisis, but we all forget to do the same when busy working from home.

This extension will be called **Wash Your hands** and will be similar to the 3 extensions, created in part-3.

So, go ahead and create a folder **WashYourhands** and inside it another folder **icons**. Inside that folder place an icon and name it **icon.png**

![icon.png](https://cdn-images-1.medium.com/max/2880/1*nSoldco9jgzhErio_Hcb5A.png)*icon.png*

Now, create a file **manifest.json** inside the folder **WashYourhands** and put the below content in it.

![manifest.json](https://cdn-images-1.medium.com/max/2880/1*Gi4nNDFXYhJBPBbyC8aKPQ.png)*manifest.json*

Next, create a file **background.js** and put the below content in it.

![background.js](https://cdn-images-1.medium.com/max/2880/1*9nRlXJdEwOInQnLUgATcKw.png)*background.js*

Again will to publish this addon to the mozilla addon store and will follow the procedure explained in [part-2](https://dev.to/nabendu82/creating-firefox-browser-extensions-2-3gpn) of this series.

I had followed the procedure and submitted the firefox extension and it is **Awaiting Review** now.

![Addon](https://cdn-images-1.medium.com/max/2880/1*x2uJLd81kwo7WbrkFYJUwg.png)*Addon*

The next extension which i want to create is **Covid-19 Advices**. These are the advice given on WHO site [https://www.who.int/emergencies/diseases/novel-coronavirus-2019/advice-for-public](https://www.who.int/emergencies/diseases/novel-coronavirus-2019/advice-for-public)

So, these advices will be shown randomly in browser notification.

So, go ahead and create a folder **Covid-19Advices** and inside it another folder **icons**. Inside that folder place an icon and name it **icon.png**

![Covid-19Advices](https://cdn-images-1.medium.com/max/2880/1*QlMEuGVzbBeEqRnq3y8pbA.png)*Covid-19Advices*

Now, create a file **manifest.json** inside the folder **Covid-19Advices** and put the below content in it.

![manifest.json](https://cdn-images-1.medium.com/max/2880/1*zb0nPG72L77Vz8MdHmgT-Q.png)*manifest.json*

Next, create a file **background.js** and put the below content in it. The **getRandom()** is a bit different then earlier function, as it’s an array of object. When we are calling it in **onAlarm.addListener**, we are getting both **title** and **message**.

![background.js](https://cdn-images-1.medium.com/max/2880/1*BCR5qPcEAlEH3y0J7ukSbA.png)*background.js*

It’s time to publish this covid-19 addon to the mozilla addon store and will follow the procedure explained in [part-2](https://dev.to/nabendu82/creating-firefox-browser-extensions-2-3gpn) of this series.

I had followed the procedure and submitted the firefox extension and it is **Awaiting Review** now.

![Covid-19 Advices](https://cdn-images-1.medium.com/max/2880/1*zCNS7eq58JXpSdoRTjfPeg.png)*Covid-19 Advices*

Finally, both of my Covid-19 addons are approved and you can add it to firefox from [https://addons.mozilla.org/en-US/firefox/user/15774633/](https://addons.mozilla.org/en-US/firefox/user/15774633/)

So, go ahead and share these covid-19 addons.

![Covid-19 addons](https://cdn-images-1.medium.com/max/2880/1*nM1IR3At_Ln2vS2AACzn_g.png)*Covid-19 addons*

This complete part-4 of the series. You can find the code for the same in my github account [here](https://github.com/nabendu82/Addons).