├── manifest.json ├── README.md ├── script.js └── index.html /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Covid-19 Stats UK", 3 | "version": "1.0.0", 4 | "description": "latest covid data of UK", 5 | "manifest_version": 3, 6 | "author": "Sampurna Chapagain", 7 | "action":{ 8 | "default_popup": "index.html", 9 | "default_title": "Latest Covid Report" 10 | } 11 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Chrome Extension to show the latest data on covid of UK 2 | ======= 3 | ![covid_report](https://user-images.githubusercontent.com/11813341/152206544-8e629f40-bf26-4623-8a75-9621183fd0b5.gif) 4 | 5 | # Tools used # 6 | * HTML, CSS and JavaScript 7 | * [Bootstrap 5](https://getbootstrap.com/docs/5.0/getting-started/introduction/) 8 | 9 | 10 | Author [Sampurna Chapagain](https://twitter.com/saam_codes) 11 | -------------------------------------------------------------------------------- /script.js: -------------------------------------------------------------------------------- 1 | async function fetchData() { 2 | const res = await fetch ("https://api.coronavirus.data.gov.uk/v1/data"); 3 | const record = await res.json(); 4 | console.log(record); 5 | document.getElementById("date").innerHTML=record.data[0].date; 6 | document.getElementById("areaName").innerHTML=record.data[0].areaName; 7 | document.getElementById("latestBy").innerHTML=record.data[0].latestBy; 8 | document.getElementById("deathNew").innerHTML=record.data[0].deathNew; 9 | } 10 | fetchData(); -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Covid-19 Stats- UK 5 | 6 | 7 | 8 | 9 |
10 |

Covid Latest Report-UK

11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
DateCountryConfirmedDeaths
29 |
30 | 31 | 32 | 33 | 34 | 35 | --------------------------------------------------------------------------------