diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..656b89b --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +MIT License + +Copyright (c) 2020 Roshan Grewal + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index b9da6a7..ec1a4ce 100644 --- a/README.md +++ b/README.md @@ -1 +1,7 @@ -# covid-19-india-tracker-chrome-extension \ No newline at end of file +# [covid-19-india-tracker-chrome-extension](https://chrome.google.com/webstore/detail/covid-19-india-tracker/dgodpadpkgoobidmbpcfblafohcnkdhj) + +Chrome extension link: https://chrome.google.com/webstore/detail/covid-19-india-tracker/dgodpadpkgoobidmbpcfblafohcnkdhj + +![Old commits](https://github.com/roshangrewal/browser-extension/commits/master/covid-tracker) + +## OPEN for PULL requests \ No newline at end of file diff --git a/corona-128px.jpg b/corona-128px.jpg new file mode 100644 index 0000000..f5c10a0 Binary files /dev/null and b/corona-128px.jpg differ diff --git a/corona-19px.jpg b/corona-19px.jpg new file mode 100644 index 0000000..4d4bba2 Binary files /dev/null and b/corona-19px.jpg differ diff --git a/extension-view.png b/extension-view.png new file mode 100644 index 0000000..f5a8c87 Binary files /dev/null and b/extension-view.png differ diff --git a/img/in.png b/img/in.png new file mode 100644 index 0000000..d2b46f4 Binary files /dev/null and b/img/in.png differ diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..6450f32 --- /dev/null +++ b/manifest.json @@ -0,0 +1,13 @@ +{ + "name": "Covid-19 India Tracker", + "description" : "To GEt Novel Coronavirus-19 (nCovid-19) Updates", + "version": "1.0.4", + "manifest_version": 2, + "icons": {"128": "corona-128px.jpg"}, + "browser_action" : { + "default_icon": "corona-19px.jpg", + "default_title": "Covid-19", + "default_popup": "popup.html" + }, + "permissions": ["activeTab"] +} diff --git a/popup.html b/popup.html new file mode 100644 index 0000000..f4241b6 --- /dev/null +++ b/popup.html @@ -0,0 +1,64 @@ + + +
+ + +Total Cases:
+ +Active Cases:
+ +Today's Cases:
+ +Total Tests:
+ +ToTal Deaths:
+ + + + \ No newline at end of file diff --git a/popup.js b/popup.js new file mode 100644 index 0000000..e47b9d8 --- /dev/null +++ b/popup.js @@ -0,0 +1,13 @@ +fetch('https://corona.lmao.ninja/v2/countries/India') +.then(response=>{ + return response.json() +}) +.then(data =>{ + console.log(data); + + document.getElementById('totalCases').textContent += data.cases; + document.getElementById('activeCases').textContent += data.active; + document.getElementById('todayCases').textContent += data.todayCases; + document.getElementById('tests').textContent += data.tests; + document.getElementById('totalDeaths').textContent += data.deaths; +}) \ No newline at end of file diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..a1276db Binary files /dev/null and b/screenshot.png differ