From 682c874da4bb0724b0d279335af55795368fb219 Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 4 Aug 2022 10:15:35 +0100 Subject: [PATCH] . --- index.html | 1 + js/main.js | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/index.html b/index.html index 0928dcc..a1698be 100644 --- a/index.html +++ b/index.html @@ -97,6 +97,7 @@
+
diff --git a/js/main.js b/js/main.js index b97a3e6..d4dacd6 100644 --- a/js/main.js +++ b/js/main.js @@ -2605,6 +2605,14 @@ $("#btn-delete-cached-questions").click(function(evt) { // Do what should be done next... }); } else {} +$("#btn-reset-local").click(function(evt) { + var r = confirm("Clear all local data"); + if (r == true) { + (async () => { + const dbs = await window.indexedDB.databases(); + dbs.forEach(db => { window.indexedDB.deleteDatabase(db.name) }); + })(); + } else {} }); $("#btn-delete-current").click(function(evt) {