commit 3b2d6c9bfbe95449aa8a6f7f574f96a4a71c1586 Author: arnaucode Date: Wed Feb 14 01:34:14 2018 +0100 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..27670be --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules +package-lock.json +data diff --git a/README.md b/README.md new file mode 100644 index 0000000..5caa6a0 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# faircoin-calculator + +Very simple Faircoin calculator. + +The price dataset is getted from http://api.fairplayground.info/rawdata/faircoin_prices.csv diff --git a/img/faircoin-logo.png b/img/faircoin-logo.png new file mode 100644 index 0000000..eeddfed Binary files /dev/null and b/img/faircoin-logo.png differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..54e6bbc --- /dev/null +++ b/index.html @@ -0,0 +1,82 @@ + + + + + Faircoin-calculator + + + + + + + + + + Fork me on GitHub + + +
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+ FC +
+
+ +
+
+
+
+
+ +
+
+ € +
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + diff --git a/index.js b/index.js new file mode 100644 index 0000000..0c58c26 --- /dev/null +++ b/index.js @@ -0,0 +1,88 @@ +toastr.options = { + "positionClass": "toast-bottom-right" +}; + +var priceData = ""; + +//get the dataset +$(document).ready(function() { + $.ajax({ + type: "GET", + url: "http://api.fairplayground.info/rawdata/faircoin_prices.csv", + dataType: "text", + success: function(data) {processData(data);} + }); +}); +function csvToArray(csv) { + var a1 = csv.split("\n"); + var r = []; + for(var i=0; i