diff --git a/assets/js/box_hider.js b/assets/js/box_hider.js index b91f5820eed8727063da12e1590544f8f660ca7d..6a6160939771d51aac9a592260da0448dec13dcc 100644 --- a/assets/js/box_hider.js +++ b/assets/js/box_hider.js @@ -1,10 +1,10 @@ -/** +/** * This is used to hide the sections of the index page * based on the URL fragment (a.k.a. "hash") */ window.boxHider = (function() { function GetSelectedId() { - var boxId = window.location.hash; + var boxId = window.location.hash + '-card'; if (boxId.length > 0) { return boxId.substring(1); } @@ -24,10 +24,10 @@ window.boxHider = (function() { function GetSelectedBoxElement(id) { var allBoxesArray = GetAllBoxElementsArray(); var element = document.getElementById(id); - + if (allBoxesArray.includes(element)) { return element; - } + } return false; } @@ -61,7 +61,7 @@ window.boxHider = (function() { var boxId = GetSelectedId(); if (boxId.length == 0) { // If there is no hash in the URL, just show all the boxes - ShowAllBoxes(); + ShowAllBoxes(); return; } // Otherwise, proceed to getting the corresponding div element