diff options
author | Maxim Devaev <[email protected]> | 2021-08-12 10:21:35 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2021-08-12 10:21:35 +0300 |
commit | d7f65ad78854f97f439e1d79f3f25a9706d0f15f (patch) | |
tree | 309f529a68de28907d6c28f2cf1efa2c89e55b3c /web/share/js/tools.js | |
parent | 68897c94ac21b0fc5b1e30b647549c9b46aa387d (diff) |
refactoring
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")), }; }; |