Verified Commit bd74c40a authored by Laurent Heirendt's avatar Laurent Heirendt
Browse files

add layer id slug

parent fd9ad142
Pipeline #45879 passed with stages
in 2 minutes and 12 seconds
/**
/**
* 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment