diff options
author | 2018-06-13 12:53:21 +0100 | |
---|---|---|
committer | 2018-06-13 12:53:21 +0100 | |
commit | afff6a5a1b25729f6be3f3b565d61ff3e56d9c36 (patch) | |
tree | bbcdb7c0ae54a8d3f14f4df77bf98eda2bf37ca8 /static/js/wiki.js | |
parent | Update GitLab URL (diff) |
Add JavaScript linting
Diffstat (limited to '')
-rw-r--r-- | static/js/wiki.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/static/js/wiki.js b/static/js/wiki.js index 6ef4efa9..603eebef 100644 --- a/static/js/wiki.js +++ b/static/js/wiki.js @@ -1,15 +1,15 @@ "use strict"; -(function(){ // Use a closure to avoid polluting global scope +(function(){ // Use a closure to avoid polluting global scope const visible_class = "uk-visible@s"; const sidebar = document.getElementById("wiki-sidebar"); const display_button = document.getElementById("wiki-sidebar-button"); display_button.onclick = function() { if (sidebar.classList.contains(visible_class)) { - sidebar.classList.remove(visible_class) + sidebar.classList.remove(visible_class); } else { - sidebar.classList.add(visible_class) + sidebar.classList.add(visible_class); } - } -}()); + }; +})(); |