Welcome to the Location Chrome Extension! This extension allows you to easily retrieve and display your country and city based on your IP address. With a clean and user-friendly design, you can access your location information with just a click.
- Click the Chrome extension icon to open the popup.
- The popup displays a centred button with the text "Show my location."
- When you click the button, it enters a loading state while your location is being determined.
- Once the location is fetched, it displays your country and city in a formatted message.
- If there is an error in fetching the location, it displays an error message.
- You can also access the link to Plasmo documentation for more information.
- The extension makes use of the IPify API to fetch your IP address.
- The IP address is then used to call the ipinfo.io API to get your country and city information.
- The fetched data is displayed in the popup interface using React and styled with Tailwind CSS.
- Clone the repository.
- Install dependencies using
pnpm install
. - Rename the
.env.example
file to.env
and replaceYOUR_IPINFO_TOKEN
with your actual IPinfo access token.
- Click on the Chrome extension icon to open the popup.
- Click the "Show my location" button to retrieve and display your country and city.
Contributions are welcome!