Skip to content
Snippets Groups Projects
Verified Commit bd74c40a authored by Laurent Heirendt's avatar Laurent Heirendt :airplane:
Browse files

add layer id slug

parent fd9ad142
No related branches found
No related tags found
No related merge requests found
/**
/**
* 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment