A Chrome extension to show your public IP address.
Get it from the Chrome Web Store.
- After installing the extension, pin it to your browser.
- To see your public IP address, click on the icon.
- A popup should appear showing your public IP address.
- When user clicks on the icon, Chrome looks at
manifest.json
and finds:
"action": { "default_popup": "index.html" ... }
- This brings up the HTML from
index.html
, which brings with it the script inindex.js
. index.js
makes aGET
call tohttps://api.ipify.org?format=json
to fetch the IP address.- The API responds with the IP address which is then displayed in the HTML popup.
- I wanted to learn the process of publishing a Chrome extension on the Chrome Web Store.
- I chose to implement the public IP address finder functionality since it is an easy yet useful one. Internet users already have other options like putting What is my IP address into Google, or something like
curl ifconfig.me
in Terminal. This Chrome extension option is more convenient since all it takes is one click on the icon and you have your public IP which you could then copy to your clipboard.
- The process of creating a developer account to publish your Chrome extension on the Chrome Web Store requires filling out your information.
- To publish, your extension goes through a review period before it is accepted and published.
- You also need to let the Chrome Web Store team know if your extension will be collecting user data.