From afff6a5a1b25729f6be3f3b565d61ff3e56d9c36 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Wed, 13 Jun 2018 12:53:21 +0100 Subject: Add JavaScript linting --- static/js/wiki.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'static/js/wiki.js') 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); } - } -}()); + }; +})(); -- cgit v1.2.3