diff options
Diffstat (limited to 'web/share/js/tools.js')
-rw-r--r-- | web/share/js/tools.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/web/share/js/tools.js b/web/share/js/tools.js index 63524a6a..e9de1187 100644 --- a/web/share/js/tools.js +++ b/web/share/js/tools.js @@ -139,6 +139,14 @@ export var tools = new function() { $(`${el.id}-value`).style.width = `${percent}%`; }; + this.setHiddenVisible = function(el, visible) { + el.classList.toggle("hidden", !visible); + }; + + this.setFeatureEnabled = function(el, enabled) { + el.classList.toggle("feature-disabled", !enabled); + }; + /************************************************************************/ let __debug = (new URL(window.location.href)).searchParams.get("debug"); |