Adding Clipboard Support to Chrome Extension: Show My IP Addresses (External and Local)

in #utopian-io7 years ago (edited)

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.

image.png

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:

image.png

This Commit

Commits

Chrome Webstore

The chrome extension can be installed via Chrome Webstore directly: https://chrome.google.com/webstore/detail/opljiobgnagdjikipnagigiacllolpaj/

image.png

Contribute

Github: https://github.com/DoctorLai/what-is-my-ip/

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

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

Hey @justyy I am @utopian-io. I have just upvoted you!

Achievements

  • WOW WOW WOW People loved what you did here. GREAT JOB!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

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!

Coin Marketplace

STEEM 0.17
TRX 0.16
JST 0.031
BTC 60343.62
ETH 2490.29
USDT 1.00
SBD 2.53