mirror of
https://github.com/lancedikson/bowser
synced 2026-03-02 03:40:27 +00:00
docs(bowser): auto-generate docs
This commit is contained in:
12
docs/scripts/nav.js
Normal file
12
docs/scripts/nav.js
Normal file
@@ -0,0 +1,12 @@
|
||||
function scrollToNavItem() {
|
||||
var path = window.location.href.split('/').pop().replace(/\.html/, '');
|
||||
document.querySelectorAll('nav a').forEach(function(link) {
|
||||
var href = link.attributes.href.value.replace(/\.html/, '');
|
||||
if (path === href) {
|
||||
link.scrollIntoView({block: 'center'});
|
||||
return;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
scrollToNavItem();
|
||||
Reference in New Issue
Block a user