This extension fetches live cricket match scores from an API and dynamically displays them along with country flags of the participating teams.
- Displays live scores of matches from the ICC Men's T20 World Cup 2024.
- Shows team names, scores, and match status dynamically.
- Includes country flags next to each team for visual identification.
- HTML
- CSS
- JavaScript
To run this project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/your-username/live-cricket-scores.git
-
Navigate into the project directory:
cd live-cricket-scores
-
Get your key from CricAPI then, Click on load upacked and select the folder
- The
script.js
file fetches live match data from an API (https://api.cricapi.com/v1/currentMatches
) usingfetch()
andasync/await
. - Matches are filtered to include only those from the ICC Men's T20 World Cup 2024.
- For each match, a list item (
<li>
) is dynamically created and appended to the<ul>
with idmatch-list
. - Country flags are displayed using
<img>
tags alongside team names.
This project uses the CricAPI for fetching live cricket match data. You need to replace 'YOUR_API_KEY'
in script.js
with your own API key obtained from CricAPI.