From 94776831d89f39bc7d9dc098da9b35e8793ff6ed Mon Sep 17 00:00:00 2001 From: Bel LaPointe Date: Sun, 28 Feb 2021 00:43:02 -0600 Subject: [PATCH] Add flushing namespace --- nullboard.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/nullboard.html b/nullboard.html index 258587c..f32b3e5 100644 --- a/nullboard.html +++ b/nullboard.html @@ -1166,6 +1166,7 @@ Export board... Use lightdark theme Use smallerlarger font + Flush namespace Set namespace @@ -3066,6 +3067,19 @@ return true; }); + $('.config .flush-namespace').click(function() { + var namespace = getCurrentNamespace(); + var confirmation = confirm("Are you sure you want to clear " + namespace + "?"); + if (! confirmation) + return false; + globalStorage.forEach((k) => { + globalStorage.del(k); + }); + popAllNamespaces(namespace); + setGlobalNamespace(getAllNamespaces()[0]); + return false; + }); + $('.config .switch-namespace').click(function() { var namespace = prompt("Namespace", getCurrentNamespace()); if (namespace != getCurrentNamespace())