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.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/web/share/js/tools.js b/web/share/js/tools.js
index f2805fc3..789c4b12 100644
--- a/web/share/js/tools.js
+++ b/web/share/js/tools.js
@@ -346,6 +346,16 @@ export var tools = new function() {
};
};
+ self.config = new function() {
+ return {
+ "get": function(key, default_value) {
+ let value = window.getComputedStyle(document.documentElement).getPropertyValue(`--config-ui--${key}`);
+ return (value || default_value);
+ },
+ "getBool": (key, default_value) => !!parseInt(self.config.get(key, (default_value ? "1" : "0"))),
+ };
+ };
+
self.browser = browser;
};