CoinTool Update: Arbitrary Historical Date Period + Amount Conversion to Local Currency + Preserve Historical Graphs

in #utopian-io6 years ago (edited)

Introduction

CoinTools is a handy gadget to Chrome browser that you can launch easily to view the information of cryptocurrency.

https://chrome.google.com/webstore/detail/coin-tools/fmglcggbdcbkpkfapngjobfeakehpcgj

Previous Contributions

  • v0.0.9: CoinTools Update: v0.0.9, Specify Amount + Reverse Cryptocurrency Calculation
  • v0.0.8: CoinTools Update: v0.0.8: Add Coinbase API + Customized History Data
  • v0.0.7: CoinTools: Historical Conversion between Any Two Cryptocurrency
  • v0.0.6: CoinTools Update: Show Full Cryptocurrency Details by Click or Startup, Add Language Handlers
  • v0.0.5: CoinTools v0.0.5: Update: Cryptocurrency Converter Calculator, Support Coin Symbols and Add More Localization
  • v0.0.4: CoinTools v0.0.4: Conversion Between Two Fiat or Fiat-Coin + 24 Hour Cap Chart
  • v0.0.3: CoinTools v0.0.3: Adding Total Market Cap USD Chart, Localization and Stock Price Emoji
  • v0.0.2: Cryptocurrency Conversion + UI Localization
  • v0.0.1: Introduction to CoinTools! A Cryptocurrency Chrome Extension

Technology Stacks

Javascript that runs in Chrome.

Github

https://github.com/DoctorLai/CoinTools

Chrome Webstore

It is available online at Chrome Webstore:
https://chrome.google.com/webstore/detail/coin-tools/fmglcggbdcbkpkfapngjobfeakehpcgj

v0.0.11 Feature

This commit contains:

  • Bug fixed in historical graph when users enter lowercase symbol the graphs doesn't show which is caused to external API that does not like lowercase symbols.
  • Historical Graphs are now preserved in the reserved order (like a stack) and you can clear the graphs by clicking the button.
  • You can specify the format like 100 SBD that will be converted to your local currency and BTC
  • The users now can enter arbitrary number of days in the historical tab. Also, if a number is less than 3 days, the API of minute will be called. If it is between 3 to 7, then API of hour will be called otherwise API of day will be used.
  • Code Refactoring e.g. the random_id is provided to improve the code robustness.

Screenshots of CoinTool

New format is supported (easy to use)
image.png

Conversions are done on the fly.
image.png

Graphs are pushed to the bottom and you can clear the tab via Clear Button.
image.png

Javascript code that deals with the new format

if (pair.length == 2) {
    let a = pair[0].trim().toUpperCase();
    let b = pair[1].trim().toUpperCase();
    if (isNumeric(a)) {
        if (isValidSymbol(b)) {
            let dom = $('div#conversion_results');
            let dom_id = "convert" + random_id();
            dom.append('<div id="' + dom_id + '"> </div>');
            getConversion(b, "BTC").then(x => {
                $('div#' + dom_id).html("<h4>" + a + " " + b +  " = <span class=yellow>" + (x * a) + "</span> " + "BTC" + "</h4>");
            });                    
            if (local_currency != '') {
                let dom = $('div#conversion_results');
                let dom_id = "convert" + random_id();
                dom.append('<div id="' + dom_id + '"> </div>');
                getConversion(b, local_currency).then(x => {
                    $('div#' + dom_id).html("<h4>" + a + " " + b +  " = <span class=yellow>" + (x * a) + "</span> " + local_currency + "</h4>");
                });                                            
            }
        }
    }
}

Roadmap of CoinTools

Any good suggestions, please shout at @justyy.

License

MIT

Contribution Welcome

Github: https://github.com/DoctorLai/CoinTools/

  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.

Chrome Webstore

Install the CoinTools Now!



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

This is neat. Do they have an extension for Mozilla?
A few days ago I was thinking the way I have to log on to or open several web pages to see different prices. I don't mind it except when in hurry.
Would definitely try and see this for myself. Thanks.

You actually can run Chrome extension in Firefox using Google Chrome Foxified but this plugin is not tested in Firefox.

Thank you for the contribution. It has been approved.

I would highly recommend you to put in more work into one contribution.

You can contact us on Discord.

[utopian-moderator]

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

Coin Marketplace

STEEM 0.27
TRX 0.12
JST 0.031
BTC 68526.92
ETH 3726.80
USDT 1.00
SBD 3.73