This commit is contained in:
ed 2021-03-04 21:12:54 +01:00
parent f7196ac773
commit 7e4c1238ba
2 changed files with 8 additions and 2 deletions

View file

@ -462,7 +462,7 @@ function play(tid, call_depth) {
o.setAttribute('id', 'thx_js');
if (window.history && history.replaceState) {
var nurl = (document.location + '').split('#')[0] + '#' + oid;
hist_push(ebi('files').innerHTML, nurl);
hist_replace(ebi('files').innerHTML, nurl);
}
else {
document.location.hash = oid;
@ -971,7 +971,7 @@ function autoplay_blocked() {
if (window.history && history.pushState) {
var u = get_vpath() + window.location.hash;
hist_push(ebi('files').innerHTML, u);
hist_replace(ebi('files').innerHTML, u);
}
})();

View file

@ -299,3 +299,9 @@ function hist_push(html, url) {
sessionStorage.setItem(key, html);
history.pushState(key, url, url);
}
function hist_replace(html, url) {
var key = new Date().getTime();
sessionStorage.setItem(key, html);
history.replaceState(key, url, url);
}