Skip to content

Commit 892adfe

Browse files
committed
Merge pull request #42 from rlord/dev
Change scrollHistory to use window.location.replace
2 parents a2735e0 + 9e613e9 commit 892adfe

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/javascripts/jquery.tocify.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -684,12 +684,11 @@
684684

685685
if(self.options.scrollHistory) {
686686

687-
if(window.location.hash !== anchorText) {
687+
if(window.location.hash !== "#" + anchorText) {
688688

689-
window.location.hash = anchorText;
689+
window.location.replace("#" + anchorText);
690690

691691
}
692-
693692
}
694693

695694
// If the `showAndHideOnScroll` option is true

src/javascripts/jquery.tocify.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)