diff options
author | Devaev Maxim <[email protected]> | 2020-07-11 01:58:07 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-07-11 01:58:07 +0300 |
commit | 01fee4992bdc1a464a68ef10f7faf68bbba05a38 (patch) | |
tree | 0e14050ee044376146f47872d9dd6932b9daa717 /web/share/js/tools.js | |
parent | e390914c7ee8441088986a9e1e1dcc629c88aab9 (diff) |
refactoring
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"); |