allow cleaning up idbfs

This commit is contained in:
radius 2016-11-21 20:58:45 -05:00
parent 797ef01b85
commit 50539d58df
3 changed files with 46 additions and 2 deletions

View File

@ -48,9 +48,24 @@ var showError = function(error) {
function cleanupStorage()
{
localStorage.clear();
document.getElementById('btnClean').disabled = true;
if (BrowserFS.FileSystem.IndexedDB.isAvailable())
{
var req = indexedDB.deleteDatabase("RetroArch");
req.onsuccess = function () {
console.log("Deleted database successfully");
};
req.onerror = function () {
console.log("Couldn't delete database");
};
req.onblocked = function () {
console.log("Couldn't delete database due to the operation being blocked");
};
}
document.getElementById("btnClean").disabled = true;
}
function dropboxInit()
{
//document.getElementById("btnDrop").disabled = true;

View File

@ -48,9 +48,24 @@ var showError = function(error) {
function cleanupStorage()
{
localStorage.clear();
document.getElementById('btnClean').disabled = true;
if (BrowserFS.FileSystem.IndexedDB.isAvailable())
{
var req = indexedDB.deleteDatabase("RetroArch");
req.onsuccess = function () {
console.log("Deleted database successfully");
};
req.onerror = function () {
console.log("Couldn't delete database");
};
req.onblocked = function () {
console.log("Couldn't delete database due to the operation being blocked");
};
}
document.getElementById("btnClean").disabled = true;
}
function dropboxInit()
{
document.getElementById('btnRun').disabled = true;

View File

@ -48,6 +48,20 @@ var showError = function(error) {
function cleanupStorage()
{
localStorage.clear();
if (BrowserFS.FileSystem.IndexedDB.isAvailable())
{
var req = indexedDB.deleteDatabase("RetroArch");
req.onsuccess = function () {
console.log("Deleted database successfully");
};
req.onerror = function () {
console.log("Couldn't delete database");
};
req.onblocked = function () {
console.log("Couldn't delete database due to the operation being blocked");
};
}
document.getElementById("btnClean").disabled = true;
}