test
This commit is contained in:
parent
64d6d70480
commit
f2d2509c2e
|
@ -21,21 +21,23 @@ function putJson(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getJson() {
|
function getJson() {
|
||||||
displayMeta();
|
if (GoogleAuth.isSignedIn.get() === true) {
|
||||||
console.log(`getJson`);
|
displayMeta();
|
||||||
let req = new XMLHttpRequest();
|
console.log(`getJson`);
|
||||||
req.onreadystatechange = () => {
|
let req = new XMLHttpRequest();
|
||||||
if (req.readyState == XMLHttpRequest.DONE) {
|
req.onreadystatechange = () => {
|
||||||
window.punches = JSON.parse(req.responseText);
|
if (req.readyState == XMLHttpRequest.DONE) {
|
||||||
window.punches.sort(function(a, b){return a.priority - b.priority});
|
window.punches = JSON.parse(req.responseText);
|
||||||
//callback(window.punches);
|
window.punches.sort(function(a, b){return a.priority - b.priority});
|
||||||
genStatuses(window.punches);
|
//callback(window.punches);
|
||||||
}
|
genStatuses(window.punches);
|
||||||
};
|
}
|
||||||
|
};
|
||||||
req.open("GET", jsonUrl, true);
|
|
||||||
req.send();
|
|
||||||
|
|
||||||
|
req.open("GET", jsonUrl, true);
|
||||||
|
req.send();
|
||||||
|
} else {
|
||||||
|
console.log('not logged in');
|
||||||
}
|
}
|
||||||
|
|
||||||
function findArrayId(uid) {
|
function findArrayId(uid) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
var version = "0.4.012",
|
var version = "0.4.015",
|
||||||
debug = false,
|
debug = false,
|
||||||
jsonUrl = "https://api.myjson.com/bins/1dodsj",
|
jsonUrl = "https://api.myjson.com/bins/1dodsj",
|
||||||
showDone = false,
|
showDone = false,
|
||||||
|
|
Loading…
Reference in New Issue