Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
R3
howto-cards
Commits
bd74c40a
Verified
Commit
bd74c40a
authored
Aug 25, 2021
by
Laurent Heirendt
✈
Browse files
add layer id slug
parent
fd9ad142
Pipeline
#45879
passed with stages
in 2 minutes and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
assets/js/box_hider.js
View file @
bd74c40a
/**
/**
* 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment