Merge pull request #392 from Tipx-L/PR-Branch
The Database Update: Extra.
This commit is contained in:
commit
576a3b771d
11
game/game.js
11
game/game.js
|
@ -4027,6 +4027,7 @@
|
||||||
style.width='150px';
|
style.width='150px';
|
||||||
const firstChild=node.firstChild;
|
const firstChild=node.firstChild;
|
||||||
firstChild.removeAttribute('class');
|
firstChild.removeAttribute('class');
|
||||||
|
firstChild.style.position='initial';
|
||||||
if(link=='false') return;
|
if(link=='false') return;
|
||||||
const ruby=document.createElement('ruby');
|
const ruby=document.createElement('ruby');
|
||||||
ruby.textContent=name;
|
ruby.textContent=name;
|
||||||
|
@ -9371,19 +9372,13 @@
|
||||||
if(!idbDatabase.objectStoreNames.contains('file')) idbDatabase.createObjectStore('file').transaction.oncomplete=()=>{
|
if(!idbDatabase.objectStoreNames.contains('file')) idbDatabase.createObjectStore('file').transaction.oncomplete=()=>{
|
||||||
if(idbDatabase.objectStoreNames.contains('audio')) idbDatabase.transaction('audio').objectStore('audio').openCursor().onsuccess=event=>{
|
if(idbDatabase.objectStoreNames.contains('audio')) idbDatabase.transaction('audio').objectStore('audio').openCursor().onsuccess=event=>{
|
||||||
const result=event.target.result;
|
const result=event.target.result;
|
||||||
if(!result){
|
if(!result) return;
|
||||||
idbDatabase.deleteObjectStore('audio');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
idbDatabase.transaction('file','readwrite').objectStore('file').put(result.value,result.key);
|
idbDatabase.transaction('file','readwrite').objectStore('file').put(result.value,result.key);
|
||||||
result.continue();
|
result.continue();
|
||||||
};
|
};
|
||||||
if(idbDatabase.objectStoreNames.contains('image')) idbDatabase.transaction('image').objectStore('image').openCursor().onsuccess=event=>{
|
if(idbDatabase.objectStoreNames.contains('image')) idbDatabase.transaction('image').objectStore('image').openCursor().onsuccess=event=>{
|
||||||
const result=event.target.result;
|
const result=event.target.result;
|
||||||
if(!result){
|
if(!result) return;
|
||||||
idbDatabase.deleteObjectStore('image');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
idbDatabase.transaction('file','readwrite').objectStore('file').put(result.value,result.key);
|
idbDatabase.transaction('file','readwrite').objectStore('file').put(result.value,result.key);
|
||||||
result.continue();
|
result.continue();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue