forked from cadence/breezewiki
Compare commits
2 commits
ba08b2bfac
...
0e2b5ea452
Author | SHA1 | Date | |
---|---|---|---|
0e2b5ea452 | |||
2b3a8fe108 |
1 changed files with 4 additions and 1 deletions
|
@ -66,6 +66,9 @@ function setCurrentTab(tabber, tab, content) {
|
|||
tab.classList.add("wds-is-current");
|
||||
content.classList.add("wds-is-current");
|
||||
if (tab.dataset.hash) {
|
||||
location.hash = "#" + tab.dataset.hash;
|
||||
let fragment = "#" + tab.dataset.hash;
|
||||
if (location.hash !== fragment) {
|
||||
history.pushState(null, "", fragment);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue