fix: change anchor jump to scrollIntoView

This commit is contained in:
沈宇 2020-01-07 13:12:44 +08:00 committed by GitHub
parent a8b0534861
commit 758b378e82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,6 +19,10 @@
positionFixedSelector: '.tocbot',
positionFixedClass: 'is-position-fixed',
fixedSidebarOffset: 'auto',
onClick: (e) => {
document.getElementById(e.target.innerText).scrollIntoView()
return false;
}
});
</script>
<% } %>
@ -40,4 +44,4 @@
<script type="text/javascript" src="https://js.users.51.la/20544303.js"></script>