ced885d03f
* added grid * add table to textoutput * add all three outputs * add shortcuts * fix sound bug for triangle * fix triangle bug - again
18 lines
530 B
JavaScript
18 lines
530 B
JavaScript
var allData;
|
|
function fetchJSONFile(path, callback) {
|
|
var httpRequest = new XMLHttpRequest();
|
|
httpRequest.onreadystatechange = function() {
|
|
if (httpRequest.readyState === 4) {
|
|
if (httpRequest.status === 200) {
|
|
var data = JSON.parse(httpRequest.responseText);
|
|
if (callback) callback(data);
|
|
}
|
|
}
|
|
};
|
|
httpRequest.open('GET', path,false);
|
|
httpRequest.send();
|
|
}
|
|
|
|
fetchJSONFile('/interceptor/data.min.json', function(data){
|
|
allData = data;
|
|
});
|