Limit "auto scroll ToC" to Chromium-based
This commit is contained in:
@ -61,7 +61,7 @@ $(document).ready(function () {
|
||||
}
|
||||
|
||||
// Auto scroll sticky ToC with content
|
||||
document.addEventListener("gumshoeActivate", function (event) {
|
||||
const scrollTocToContent = function (event) {
|
||||
var target = event.target;
|
||||
var scrollOptions = { behavior: "auto", block: "nearest", inline: "start" };
|
||||
|
||||
@ -75,7 +75,12 @@ $(document).ready(function () {
|
||||
} else {
|
||||
target.scrollIntoView(scrollOptions);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// Has issues on Firefox, whitelist Chrome for now
|
||||
if (!!window.chrome) {
|
||||
document.addEventListener("gumshoeActivate", scrollTocToContent);
|
||||
}
|
||||
|
||||
// add lightbox class to all image links
|
||||
$(
|
||||
|
2
assets/js/main.min.js
vendored
2
assets/js/main.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user