All courses now render properly. WIP items (shell, banana, fake item)

This commit is contained in:
riperiperi committed 2019-06-09 23:50:55 +01:00
1 parent e010627b5d
commit ff21142744
45 files changed
+3400 -1193

No files matched your search

+14 -1
View File
@@ -10,7 +10,7 @@ window.fileStore = new (function(){
|| window.mozIndexedDB
|| window.shimIndexedDB;
var request = indexedDB.open("MKJS_DB", 1);
var request = indexedDB.open("MKJS-DB", 1);
request.onerror = window.onerror;
request.onsuccess = function(event) {
@@ -40,6 +40,18 @@ window.fileStore = new (function(){
};
}
function validateFiles() {
var transaction = db.transaction(["files"]);
var objectStore = transaction.objectStore("files");
var request = objectStore.get("mkds.nds");
request.onerror = function(event) {
alert("Fatal database error!");
};
request.onsuccess = function(event) {
if (request.result == null) alert("Locally storing files failed!");
};
}
function downloadGame(url, callback) {
if (typeof url == "string") {
var xml = new XMLHttpRequest();
@@ -77,6 +89,7 @@ window.fileStore = new (function(){
callback(dat);
};
request.onsuccess = function(event) {
validateFiles();
callback(dat);
};
}