diff options
Diffstat (limited to 'web/share/js/tools.js')
-rw-r--r-- | web/share/js/tools.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/web/share/js/tools.js b/web/share/js/tools.js index 10013727..dc443517 100644 --- a/web/share/js/tools.js +++ b/web/share/js/tools.js @@ -277,6 +277,9 @@ export var tools = new function() { return (value !== null ? value : default_value); }, "set": (key, value) => window.localStorage.setItem(key, value), + + "getBool": (key, default_value) => !!parseInt(self.storage.get(key, (default_value ? "1" : "0"))), + "setBool": (key, value) => self.storage.set(key, (value ? "1" : "0")), }; }; |