Adding Clipboard Support to Chrome Extension: Show My IP Addresses (External and Local)
Show My IP Addresses is a Chrome Extension that displays both Local and External IP addresses by one click.
Technology Stack
The Chrome Extension is written in Javascript, that is specifically targeting the Chrome Browser.
New Features
For latest version 0.6.8, I have spent some time adding the Clipboard support so that with one click, the network administrator can copy the addresses to clipboard.
Clipboard-related code
// Copy text to the clipboard.
function copyToClipboard(text, t) {
var copyFrom = $('<textarea/>');
copyFrom.text(text);
$('body').append(copyFrom);
copyFrom.select();
document.execCommand('copy');
copyFrom.remove();
$(t).html('Copied!');
}
The UI has been simplified quite a bit as well, so that the API log is hidden by default. The users can click to see more data:
This Commit
Chrome Webstore
The chrome extension can be installed via Chrome Webstore directly: https://chrome.google.com/webstore/detail/opljiobgnagdjikipnagigiacllolpaj/
Contribute
Github: https://github.com/DoctorLai/what-is-my-ip/
- Fork it!
- Create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request
Posted on Utopian.io - Rewarding Open Source Contributors
Ohhhh So thanks @justyy for sharing this issu with us.
Thank you for the contribution. It has been approved.
The code does look good. The post has some visuals and is informative.
I'm interested to know what makes this tool unique?
You can contact us on Discord.
[utopian-moderator]
There are indeed some other similar tools, but this one provides both external and local IP addresses, and the external IP addresses are fetched from 5 different sources so it can' t be wrong!
BTW, I've merged your contributions to the PHP-utopian , well done... (I was going to write the Post class tonight but you did it first!) :P
@originalworks
Hey @justyy I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
thanks your post!