From 0e23f43411319465776a8b1b5d788ad2db3b8178 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 14 Oct 2012 12:36:20 -0700 Subject: Adjust QR code size, use market depth ticker --- .gitignore | 2 +- index.html | 13 +++++++------ qr.js | 12 ++---------- ticker.json | 1 - 4 files changed, 10 insertions(+), 18 deletions(-) delete mode 100644 ticker.json diff --git a/.gitignore b/.gitignore index 4648a5f7..b861dc10 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -ticker +ticker.json transactions.csv .htpasswd diff --git a/index.html b/index.html index 2c4a0762..4593e9b7 100644 --- a/index.html +++ b/index.html @@ -58,7 +58,9 @@ } $.getJSON('ticker.json', function (data) { - exchange = data.return.last_local.value; + exchange = 100 / data.out; + exchange = exchange + exchange * 0.03; + exchange = Math.ceil(exchange * 100) / 100; $('#exchange').html(exchange); updateTotal(); }); @@ -98,13 +100,11 @@ -
$ CAD @ @@ -124,10 +124,11 @@
+ No Canvas Support + +
+ Waiting for Payment
-
- No Canvas Support? -
diff --git a/qr.js b/qr.js index 8cc18f69..a7b00794 100644 --- a/qr.js +++ b/qr.js @@ -703,24 +703,16 @@ function genframe(instring) var wd, ht, qrc; function setupqr(){ - wd = window.innerWidth-40; - ht = window.innerHeight-40; + wd = 250; + ht = 250; mp = document.getElementById("mapcanv"); - qrd = document.getElementById("qrdiv"); - qrd.style.width = wd + "px"; - qrd.style.height = ht + "px"; - - wd -= 4; - ht -= 80; - var elem = document.getElementById('qrcanv'); qrc = elem.getContext('2d'); qrc.canvas.width = wd; qrc.canvas.height = ht; qrc.fillStyle = '#eee'; qrc.fillRect(0,0,wd,ht); - } function doqr(value) { diff --git a/ticker.json b/ticker.json deleted file mode 100644 index 926e9b72..00000000 --- a/ticker.json +++ /dev/null @@ -1 +0,0 @@ -{"result":"success","return":{"high":{"value":"10.89000","value_int":"1089000","display":"CA$10.89000","display_short":"CA$10.89","currency":"CAD"},"low":{"value":"10.89000","value_int":"1089000","display":"CA$10.89000","display_short":"CA$10.89","currency":"CAD"},"avg":{"value":"10.89000","value_int":"1089000","display":"CA$10.89000","display_short":"CA$10.89","currency":"CAD"},"vwap":{"value":"10.89000","value_int":"1089000","display":"CA$10.89000","display_short":"CA$10.89","currency":"CAD"},"vol":{"value":"3.40000000","value_int":"340000000","display":"3.40000000\u00a0BTC","display_short":"3.40\u00a0BTC","currency":"BTC"},"last_local":{"value":"10.89000","value_int":"1089000","display":"CA$10.89000","display_short":"CA$10.89","currency":"CAD"},"last":{"value":"10.89000","value_int":"1089000","display":"CA$10.89000","display_short":"CA$10.89","currency":"CAD"},"last_orig":{"value":"11.10629","value_int":"1110629","display":"$11.10629","display_short":"$11.11","currency":"USD"},"last_all":{"value":"10.79535","value_int":"1079535","display":"CA$10.79535","display_short":"CA$10.80","currency":"CAD"},"buy":{"value":"10.64177","value_int":"1064177","display":"CA$10.64177","display_short":"CA$10.64","currency":"CAD"},"sell":{"value":"10.95000","value_int":"1095000","display":"CA$10.95000","display_short":"CA$10.95","currency":"CAD"}}} \ No newline at end of file -- cgit v1.2.3