From: Michal Date: Wed, 15 Aug 2018 10:14:06 +0000 (+0200) Subject: Remove commented out code X-Git-Url: http://rtime.felk.cvut.cz/gitweb/coffee/coffee-flask.git/commitdiff_plain/62a598b72247442c77a812db466e718d4b8df9c0 Remove commented out code --- diff --git a/templates/main.js b/templates/main.js index 23f1992..178d9c8 100644 --- a/templates/main.js +++ b/templates/main.js @@ -66,23 +66,13 @@ function updateUI() function hiddenUpdateRemote(json) { var msg = JSON.parse(json); - //update("json", "json: " + JSON.stringify(msg)) - switch(msg.type) { case "empty": - //update("json",""); break; case "rfid": - /*update("json", - "uid: " + msg.uid + "
" + - "card type: " + msg.card_type + "
" + - "uid size: " + msg.size + " bytes
" + - "sak: " + msg.sak - );*/ login(msg.uid); break; case "keys": - //update("json", "key: " + msg.key); var flavor = getFlavor(msg.key); if (flavor !== "") { addCoffee(flavor); @@ -117,6 +107,7 @@ function loadRemote(string) { loadRemote(); function ajax(method, route, data, id) { + var now = Date.now(); var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function() { if (this.readyState == 4) { @@ -128,7 +119,6 @@ function ajax(method, route, data, id) { updateUI(); if (localStorage) { - var now = Date.now(); var fuck = JSON.stringify({ type: "fuck", method: method,