summaryrefslogtreecommitdiff
path: root/web/share/js/tools.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/share/js/tools.js')
-rw-r--r--web/share/js/tools.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/web/share/js/tools.js b/web/share/js/tools.js
index ef21b69f..12291e48 100644
--- a/web/share/js/tools.js
+++ b/web/share/js/tools.js
@@ -392,6 +392,9 @@ export var tools = new function() {
},
"set": (key, value) => window.localStorage.setItem(key, value),
+ "getInt": (key, default_value) => parseInt(self.storage.get(key, default_value)),
+ "setInt": (key, value) => self.storage.set(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")),