mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
Update basic-handbook.page.js (#4859)
This commit is contained in:
parent
a402ccab25
commit
edd1f7d06f
1 changed files with 10 additions and 0 deletions
|
|
@ -36,6 +36,16 @@ parasails.registerPage('basic-handbook', {
|
|||
},
|
||||
});
|
||||
|
||||
// Handle hashes in urls when coming from an external page.
|
||||
if(window.location.hash){
|
||||
let possibleHashToScrollTo = _.trimLeft(window.location.hash, '#');
|
||||
let hashToScrollTo = document.getElementById(possibleHashToScrollTo);
|
||||
// If the hash matches a header's ID, we'll scroll to that section.
|
||||
if(hashToScrollTo){
|
||||
hashToScrollTo.scrollIntoView();
|
||||
}
|
||||
}
|
||||
|
||||
this.subtopics = (() => {
|
||||
let subtopics;
|
||||
if(!this.isHandbookLandingPage){
|
||||
|
|
|
|||
Loading…
Reference in a new issue