create account

CoinTools Update: v0.0.9, Specify Amount + Reverse Cryptocurrency Calculation by justyy

View this thread on: hive.blogpeakd.comecency.com
· @justyy · (edited)
$52.15
CoinTools Update: v0.0.9, Specify Amount + Reverse Cryptocurrency Calculation
## Introduction
[CoinTools](https://helloacm.com/cointools-update-v0-0-8-add-coinbase-api-customized-history-data/) is a handy gadget to Chrome browser that you can launch easily to view the information of cryptocurrency. 

## Previous Contributions
- v0.0.8: [CoinTools Update: v0.0.8: Add Coinbase API + Customized History Data](https://helloacm.com/cointools-update-v0-0-8-add-coinbase-api-customized-history-data/)
- v0.0.7: [CoinTools: Historical Conversion between Any Two Cryptocurrency](https://helloacm.com/cointools-historical-conversion-between-any-two-cryptocurrency/)
- v0.0.6: [CoinTools Update: Show Full Cryptocurrency Details by Click or Startup, Add Language Handlers](https://helloacm.com/cointools-update-show-full-cryptocurrency-details-by-click-or-startup-add-language-handlers/)
- [CoinTools v0.0.5: Update: Cryptocurrency Converter Calculator, Support Coin Symbols and Add More Localization](https://helloacm.com/cointools-update-cryptocurrency-converter-calculator-support-coin-symbols-and-add-more-localization/)
- [CoinTools v0.0.4:  Conversion Between Two Fiat or Fiat-Coin + 24 Hour Cap Chart](https://helloacm.com/cointools-v0-0-4-conversion-between-two-fiat-or-fiat-coin-24-hour-total-market-cap-chart/)
- [CoinTools v0.0.3: Adding Total Market Cap USD Chart, Localization and Stock Price Emoji](https://helloacm.com/cointools-v0-0-3-adding-total-market-cap-usd-chart-localization-and-stock-price-emoji/)
- [v0.0.2 Cryptocurrency Conversion + UI Localization](https://helloacm.com/cointool-v0-0-2-cryptocurrency-conversion-ui-localization/)
- [v0.0.1 Introduction to CoinTools! A Cryptocurrency Chrome Extension](https://helloacm.com/introduction-to-cointools-a-cryptocurrency-chrome-extension/)

## Technology Stacks
Javascript that runs in [Chrome](https://helloacm.com/how-to-enable-inline-chrome-extension-installation-in-chrome-browser/).

## 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.9 Feature
Along with some UI localizations, enhanced error handling, [this version](https://helloacm.com/cointools-update-v0-0-9-specify-amount-reverse-cryptocurrency-calculation/) allows users to reverse calculate the cryptocurrency pair and specify the amount in the conversion.

## Screenshots
Specify negative numbers means reverse calculation:
![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519762588/amigepbgpkqyvvgnbwhi.png)

and you can specify these formats:
![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519762620/mjcfqkg7spfzuqdbluvo.png)

that will fulfill the equations when APP starts up.
![image.png](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519762661/rqlfq2joyxna8e4szpue.png)

## Commits
**[Here](https://github.com/DoctorLai/CoinTools/commit/f1979edcce38274b4fabfabaa4fa39f7ccdd4261)**

## Javascript Solves Cryptocurrency Equations
The following solves either `x A = ? B` or `? A = x B`.

```
let a = pair[0].trim().toUpperCase();
let b = pair[1].trim().toUpperCase();
let c = pair[2].trim().toUpperCase();
// e.g. 100 BTC SBD
if (isNumeric(a) && isValidSymbol(b) && isValidSymbol(c)) {
    let dom = $('div#conversion_results');
    let dom_id = "cc_" + removeInvalid(a) + "_" + removeInvalid(b) + "_" + removeInvalid(c);
    dom.append('<div id="' + dom_id + '"> </div>');
    getConversion(b, c).then(x => {
        $('div#' + dom_id).html("<h4>" + a + " " + b.toUpperCase() + " = <span class=yellow>" + (x * a) + "</span> " + c.toUpperCase() + "</h4>");
    });
} else if (isNumeric(b) && isValidSymbol(a) && isValidSymbol(c)) {
    // e.g. BTC 100 SBD
    let dom = $('div#conversion_results');
    let dom_id = "cc2_" + removeInvalid(a) + "_" + removeInvalid(b) + "_" + removeInvalid(c);
    dom.append('<div id="' + dom_id + '"> </div>');
    getConversion(a, c).then(x => {
        $('div#' + dom_id).html("<h4>" + (b * 1.0 / x) + " " + a.toUpperCase() + " = <span class=yellow>" + (b) + "</span> " + c.toUpperCase() + "</h4>");
    });
} else {
    logit(get_text('error', "Error") + ": " + a + ", " + b + ", " + c);
}
```

## Roadmap of CoinTools
Any good suggestions, please shout at @justyy.

# License
[MIT](https://github.com/DoctorLai/CoinTools/blob/master/LICENSE)

# 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](https://chrome.google.com/webstore/detail/coin-tools/fmglcggbdcbkpkfapngjobfeakehpcgj) Now!

<br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@justyy/cointools-update-v0-0-9-specify-amount-reverse-cryptocurrency-calculation">Utopian.io -  Rewarding Open Source Contributors</a></em><hr/>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 34 others
properties (23)
authorjustyy
permlinkcointools-update-v0-0-9-specify-amount-reverse-cryptocurrency-calculation
categoryutopian-io
json_metadata{"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":121162429,"name":"CoinTools","full_name":"DoctorLai/CoinTools","html_url":"https://github.com/DoctorLai/CoinTools","fork":false,"owner":{"login":"DoctorLai"}},"pullRequests":[],"platform":"github","type":"development","tags":["utopian-io","steemstem","cryptocurrency","programming","steemapps"],"users":["justyy"],"links":["https://helloacm.com/cointools-update-v0-0-8-add-coinbase-api-customized-history-data/","https://helloacm.com/cointools-historical-conversion-between-any-two-cryptocurrency/","https://helloacm.com/cointools-update-show-full-cryptocurrency-details-by-click-or-startup-add-language-handlers/","https://helloacm.com/cointools-update-cryptocurrency-converter-calculator-support-coin-symbols-and-add-more-localization/","https://helloacm.com/cointools-v0-0-4-conversion-between-two-fiat-or-fiat-coin-24-hour-total-market-cap-chart/","https://helloacm.com/cointools-v0-0-3-adding-total-market-cap-usd-chart-localization-and-stock-price-emoji/","https://helloacm.com/cointool-v0-0-2-cryptocurrency-conversion-ui-localization/","https://helloacm.com/introduction-to-cointools-a-cryptocurrency-chrome-extension/","https://helloacm.com/how-to-enable-inline-chrome-extension-installation-in-chrome-browser/","https://github.com/DoctorLai/CoinTools","https://chrome.google.com/webstore/detail/coin-tools/fmglcggbdcbkpkfapngjobfeakehpcgj","https://helloacm.com/cointools-update-v0-0-9-specify-amount-reverse-cryptocurrency-calculation/","https://github.com/DoctorLai/CoinTools/commit/f1979edcce38274b4fabfabaa4fa39f7ccdd4261","https://github.com/DoctorLai/CoinTools/blob/master/LICENSE","https://github.com/DoctorLai/CoinTools/","https://utopian.io/utopian-io/@justyy/cointools-update-v0-0-9-specify-amount-reverse-cryptocurrency-calculation"],"image":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1519762588/amigepbgpkqyvvgnbwhi.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519762620/mjcfqkg7spfzuqdbluvo.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519762661/rqlfq2joyxna8e4szpue.png"],"moderator":{"account":"ms10398","time":"2018-02-28T04:39:34.247Z","reviewed":true,"pending":false,"flagged":false},"questions":[],"score":0}
created2018-02-27 20:20:12
last_update2018-02-28 04:39:36
depth0
children5
last_payout2018-03-06 20:20:12
cashout_time1969-12-31 23:59:59
total_payout_value38.520 HBD
curator_payout_value13.627 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length4,966
author_reputation280,616,224,641,976
root_title"CoinTools Update: v0.0.9, Specify Amount + Reverse Cryptocurrency Calculation"
beneficiaries
0.
accountutopian.pay
weight2,500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,950,542
net_rshares11,576,001,942,446
author_curate_reward""
vote details (98)
@chaimyu ·
看你发过steemit相关收益的文章,不知道现在怎么样?新加入这个平台,也关注你个人公众号了
properties (22)
authorchaimyu
permlinkre-justyy-cointools-update-v0-0-9-specify-amount-reverse-cryptocurrency-calculation-20180228t073946679z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-02-28 07:39:48
last_update2018-02-28 07:39:48
depth1
children0
last_payout2018-03-07 07:39:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length46
author_reputation4,692,484,611,160
root_title"CoinTools Update: v0.0.9, Specify Amount + Reverse Cryptocurrency Calculation"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id41,063,226
net_rshares0
@ms10398 ·
Thank you for the contribution. It has been approved.

You can contact us on [Discord](https://discord.gg/uTyJkNm).

**[[utopian-moderator]](https://utopian.io/moderators)**
properties (22)
authorms10398
permlinkre-justyy-cointools-update-v0-0-9-specify-amount-reverse-cryptocurrency-calculation-20180228t043945688z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2018-02-28 04:39:45
last_update2018-02-28 04:39:45
depth1
children0
last_payout2018-03-07 04:39:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length173
author_reputation27,572,487,973,390
root_title"CoinTools Update: v0.0.9, Specify Amount + Reverse Cryptocurrency Calculation"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id41,031,834
net_rshares0
@paulo380 ·
I think this should work well on mobile also? A, for now, I rely solely on cointelegraph and new.bicoin for information regarding  crypto.
properties (22)
authorpaulo380
permlinkre-justyy-cointools-update-v0-0-9-specify-amount-reverse-cryptocurrency-calculation-20180227t214349684z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-02-27 21:43:54
last_update2018-02-27 21:43:54
depth1
children1
last_payout2018-03-06 21:43:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length138
author_reputation6,388,272,905,577
root_title"CoinTools Update: v0.0.9, Specify Amount + Reverse Cryptocurrency Calculation"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,964,340
net_rshares0
@justyy ·
unfortunately, this only works in desktop chrome browsers.
properties (22)
authorjustyy
permlinkre-paulo380-re-justyy-cointools-update-v0-0-9-specify-amount-reverse-cryptocurrency-calculation-20180227t222247184z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-02-27 22:22:48
last_update2018-02-27 22:22:48
depth2
children0
last_payout2018-03-06 22:22:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length58
author_reputation280,616,224,641,976
root_title"CoinTools Update: v0.0.9, Specify Amount + Reverse Cryptocurrency Calculation"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,970,132
net_rshares0
@utopian-io ·
### 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. <a href="https://discord.gg/zTrEMqB">Participate on Discord</a>. Lets GROW TOGETHER!
- <a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1">Vote for my Witness With SteemConnect</a>
- <a href="https://v2.steemconnect.com/sign/account-witness-proxy?proxy=utopian-io&approve=1">Proxy vote to Utopian Witness with SteemConnect</a>
- Or vote/proxy on <a href="https://steemit.com/~witnesses">Steemit Witnesses</a>

[![mooncryption-utopian-witness-gif](https://steemitimages.com/DQmYPUuQRptAqNBCQRwQjKWAqWU3zJkL3RXVUtEKVury8up/mooncryption-s-utopian-io-witness-gif.gif)](https://steemit.com/~witnesses)

**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**
properties (22)
authorutopian-io
permlinkre-justyy-cointools-update-v0-0-9-specify-amount-reverse-cryptocurrency-calculation-20180228t151755390z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2018-02-28 15:17:54
last_update2018-02-28 15:17:54
depth1
children0
last_payout2018-03-07 15:17:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,061
author_reputation152,955,367,999,756
root_title"CoinTools Update: v0.0.9, Specify Amount + Reverse Cryptocurrency Calculation"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id41,149,365
net_rshares0