Replace pushState with replaceState to prevent browser history clutter in Help pages.
This commit is contained in:
parent
482e26ae26
commit
1aba495a1c
@ -53,7 +53,7 @@ $(document).ready(function () {
|
|||||||
.removeClass('selected-doco-nav')
|
.removeClass('selected-doco-nav')
|
||||||
.eq(i).addClass('selected-doco-nav');
|
.eq(i).addClass('selected-doco-nav');
|
||||||
if (typeof ($('#doco-side-toc li').eq(i).find('a').attr('href').split('#')[1]) !== 'undefined') {
|
if (typeof ($('#doco-side-toc li').eq(i).find('a').attr('href').split('#')[1]) !== 'undefined') {
|
||||||
window.history.pushState({}, '', location.href.split('#')[0] + '#' + $('#doco-side-toc li').eq(i).find('a').attr('href').split('#')[1]);
|
window.history.replaceState({}, '', location.href.split('#')[0] + '#' + $('#doco-side-toc li').eq(i).find('a').attr('href').split('#')[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -100,7 +100,7 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
}
|
}
|
||||||
// Update the address bar to reflect the loaded language
|
// Update the address bar to reflect the loaded language
|
||||||
window.history.pushState({}, '', '/' + pathParts.join('/'));
|
window.history.replaceState({}, '', '/' + pathParts.join('/'));
|
||||||
|
|
||||||
// Highlight the language in the language selector that is currently viewed
|
// Highlight the language in the language selector that is currently viewed
|
||||||
$('.lang-selector').find('.lang-choice:contains("' + help_language + '")').addClass('active');
|
$('.lang-selector').find('.lang-choice:contains("' + help_language + '")').addClass('active');
|
||||||
|
Reference in New Issue
Block a user