Merge pull request #392 from Tipx-L/PR-Branch

The Database Update: Extra.
This commit is contained in:
Spmario233 2023-09-26 09:39:24 +08:00 committed by GitHub
commit 576a3b771d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 8 deletions

View File

@ -4027,6 +4027,7 @@
style.width='150px';
const firstChild=node.firstChild;
firstChild.removeAttribute('class');
firstChild.style.position='initial';
if(link=='false') return;
const ruby=document.createElement('ruby');
ruby.textContent=name;
@ -9371,19 +9372,13 @@
if(!idbDatabase.objectStoreNames.contains('file')) idbDatabase.createObjectStore('file').transaction.oncomplete=()=>{
if(idbDatabase.objectStoreNames.contains('audio')) idbDatabase.transaction('audio').objectStore('audio').openCursor().onsuccess=event=>{
const result=event.target.result;
if(!result){
idbDatabase.deleteObjectStore('audio');
return;
}
if(!result) return;
idbDatabase.transaction('file','readwrite').objectStore('file').put(result.value,result.key);
result.continue();
};
if(idbDatabase.objectStoreNames.contains('image')) idbDatabase.transaction('image').objectStore('image').openCursor().onsuccess=event=>{
const result=event.target.result;
if(!result){
idbDatabase.deleteObjectStore('image');
return;
}
if(!result) return;
idbDatabase.transaction('file','readwrite').objectStore('file').put(result.value,result.key);
result.continue();
};