-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
custom.html
144 lines (144 loc) · 10.2 KB
/
custom.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Currency converter for Obyte by tarmo888</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="format-detection" content="telephone=no" />
<meta property="og:url" content="https://tarmo888.github.io/bb-convert/" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Currency converter for Obyte" />
<meta property="og:description" content="Tool for converting different currencies to Obyte amounts" />
<meta property="og:image" content="https://tarmo888.github.io/bb-convert/bb-convert.png" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha256-Md8eaeo67OiouuXAi8t/Xpd8t2+IaJezATVTWbZqSOw=" crossorigin="anonymous" />
<link rel="stylesheet" href="jquery-editable-select/dist/jquery-editable-select.min.css" />
<link rel="stylesheet" href="style.css?v6" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-15428727-5', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<div id="web-container">
<div class="top-about fixed-top text-center col-12 col-xs-12 mt-2">
<a href="#" data-toggle="modal" data-target="#about-modal"><span class="emoji">ℹ️</span> About custom asset currency converter</a>
</div>
<a href="https://github.com/tarmo888/bb-convert" target="_blank" class="github-corner fixed-top" aria-label="View source on Github"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; left: 0; transform: scale(-1, 1);" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a>
<div class="jumbotron d-flex align-items-center">
<div class="container-fluid">
<div class="row justify-content-center">
<div class="mb-2">
<a href="./">native bytes</a> | <a href="./black.html">blackbytes</a> | <a href="./multi.html">multi-address</a> | custom asset
</div>
</div>
<div class="row justify-content-center">
<div class="input-group input-group-md mb-3 col-xl-3 col-lg-5 col-md-5">
<input class="form-control" type="number" id="amount_to_send" min="0" placeholder="Amount to send" />
<div class="input-group-append">
<label class="input-group-text" id="amount_to_send_label" for="amount_to_send">?</label>
</div>
</div>
<div class="input-group input-group-md mb-3 col-xl-4 col-lg-6 col-md-6">
<div class="input-group-prepend">
<label class="input-group-text" for="currency_rate">Currency rate</label>
</div>
<select class="form-control" id="currency_rate" rel="" title="close and re-open tab to refresh rates"></select>
</div>
</div>
<div class="row justify-content-center">
<div class="input-group input-group-md mb-3 col-xl-7 col-lg-11 col-md-11">
<div class="input-group-prepend d-none d-sm-flex align-text-top">
<label class="input-group-text" for="asset_id"><span class="align-self-start">Asset ID</span></label>
</div>
<select class="form-control" id="asset_id" rel="">
<option value="">-- Select asset or copy-paste asset ID here --</option>
<option value="NMuNvOJRO2ZY9L17uKtsa7OYkgsV8LfSBIV9BUoVJPQ=" rel="Future">Future</option>
<option value="oF9wmH31QDL/VXppOJ9mHISrvcdJQ1rqU+Jv8GRQH84=" rel="Charm">Charm</option>
<option value="pZML61kxjqV2TcMMGr1z3z0jvAkDcOwdGzxoXjsV52Q=" rel="WhiteLittle">WhiteLittle</option>
<option value="f2TMkqij/E3qx3ALfVBA8q5ve5xAwimUm92UrEribIE=" rel="TitanCoin">TitanCoin</option>
</select>
</div>
</div>
<div class="row justify-content-center">
<div class="input-group input-group-md mb-3 col-xl-7 col-lg-11 col-md-11">
<div class="input-group-prepend d-none d-sm-flex align-text-top">
<label class="input-group-text" for="bb_address"><span class="align-self-start">Recipient</span></label>
</div>
<input class="form-control" type="text" id="bb_address" placeholder="Wallet address, steem/username, @username or any e-mail" />
</div>
</div>
<div class="row justify-content-center">
<div class="input-group input-group-md mb-3 col-xl-3 col-lg-6 col-md-6">
<a class="btn btn-primary col-xl-12" role="button" id="send-button" href="https://obyte.org/#download">send with O<sub>byte</sub> wallet</a>
</div>
</div>
<div class="row text-center">
<div class="col-12 mb-3" id="conversion"></div>
</div>
</div>
</div>
</div>
<!-- QR code modal -->
<div class="modal" id="qr-modal">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-body text-center"></div>
</div>
</div>
</div>
<!-- about modal -->
<div class="modal" id="about-modal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">About custom asset currency converter</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="mb-4">
<p>With this tool, you can calculate many fiat (government issued) currency amounts into O<sub>byte</sub> custom asset amounts, including different O<sub>byte</sub> own amounts (GByte, MByte, KByte and Byte).</p>
<p>For example, you can send 5 US dollars (or 5 euros) worth of customer asset to other users by simply filling some fields and clicking the "send with O<sub>byte</sub> wallet" button, which would automatically open your O<sub>byte</sub> wallet app waiting to be confirmed to send right amount of that custom asset.</p>
<p>It could also be used to request $5 worth of custom asset by sending a link of automatically filled form to somebody or showing somebody a QR code that gets generated when the form is correctly filled (O<sub>byte</sub> wallet app has QR code reader built in).</p>
</div>
<h5>Thanks</h5>
<div class="row">
<div class="col">
<!-- <div><span class="emoji">🔗</span> Uses <a href="https://min-api.cryptocompare.com/" target="_blank">CryptoCompare API</a> for currency rates.</div> -->
<div><span class="emoji">🔗</span> Uses <a href="https://api.coinpaprika.com/" target="_blank">CoinPaprika API</a> for currency rates.</div>
<div><span class="emoji">🔗</span> Uses <a href="https://github.com/twbs/bootstrap/tree/v4-dev" target="_blank">Twitter Bootstrap</a> for responsive grid layout and modals.</div>
<div><span class="emoji">🔗</span> Uses <a href="https://github.com/jquery/jquery" target="_blank">jQuery</a> to put everything working together.</div>
<div><span class="emoji">🔗</span> Uses <a href="https://github.com/jeromeetienne/jquery-qrcode" target="_blank">jQuery.qrcode by jeromeetienne</a> to generate QR codes.</div>
<div><span class="emoji">🔗</span> Uses <a href="https://github.com/indrimuska/jquery-editable-select" target="_blank">jquery-editable-select by indrimuska</a> for editable dropdown.</div>
<div><span class="emoji">🔗</span> Uses <a href="https://gist.github.com/aaronk6/d801d750f14ac31845e8" target="_blank">launchUri by aaronk6</a> to launch O<sub>byte</sub> app from links.</div>
<div><span class="emoji">🔗</span> Uses <a href="https://github.com/tholman/github-corners" target="_blank">github-corners by tholman</a> for nice links to Github.</div>
<div><span class="emoji">🔗</span> Uses <a href="https://github.com/afeld/jsonp" target="_blank">jsonp by afeld</a> to proxy http API requests.</div>
</div>
</div>
</div>
<div class="modal-footer">
<a class="btn btn-secondary w-100 text-truncate" href="./#amount=5&currency=USD&address=NTYO4ZKPRBPXW6WY2QUMJBPNDLOGX5OJ">donate $5 worth of bytes to author of this tool</a>
</div>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha256-xaF9RpdtRxzwYMWg4ldJoyPWqyDPCRD0Cv7YEEe6Ie8=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.qrcode/1.0/jquery.qrcode.min.js" integrity="sha256-9MzwK2kJKBmsJFdccXoIDDtsbWFh8bjYK/C7UjB1Ay0=" crossorigin="anonymous"></script>
<script src="jquery-editable-select/dist/jquery-editable-select.min.js"></script>
<script src="launch_uri/launch_uri.js"></script>
<script src="script.js?v19"></script>
<script>
$(document).ready(function() {
var params = parseParams(window.location.hash);
var price_bytes = parseFloat(params.price_bytes) ? parseFloat(params.price_bytes) : 0;
loadRates({'price_bytes': price_bytes});
});
</script>
</body>
</html>