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
Now, create a file manifest.json inside the folder WashYourhands and put the below content in it.
Next, create a file background.js and put the below content in it.
Again will to publish this addon to the mozilla addon store and will follow the procedure explained in part-2 of this series.
I had followed the procedure and submitted the firefox extension and it is Awaiting Review now.
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
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
Now, create a file manifest.json inside the folder Covid-19Advices and put the below content in it.
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.
It’s time to publish this covid-19 addon to the mozilla addon store and will follow the procedure explained in part-2 of this series.
I had followed the procedure and submitted the firefox extension and it is Awaiting Review now.
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/
So, go ahead and share these covid-19 addons.
This complete part-4 of the series. You can find the code for the same in my github account here.
Top comments (0)