mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 17:12:13 -06:00
oh
This commit is contained in:
parent
f7196ac773
commit
7e4c1238ba
|
@ -462,7 +462,7 @@ function play(tid, call_depth) {
|
||||||
o.setAttribute('id', 'thx_js');
|
o.setAttribute('id', 'thx_js');
|
||||||
if (window.history && history.replaceState) {
|
if (window.history && history.replaceState) {
|
||||||
var nurl = (document.location + '').split('#')[0] + '#' + oid;
|
var nurl = (document.location + '').split('#')[0] + '#' + oid;
|
||||||
hist_push(ebi('files').innerHTML, nurl);
|
hist_replace(ebi('files').innerHTML, nurl);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
document.location.hash = oid;
|
document.location.hash = oid;
|
||||||
|
@ -971,7 +971,7 @@ function autoplay_blocked() {
|
||||||
|
|
||||||
if (window.history && history.pushState) {
|
if (window.history && history.pushState) {
|
||||||
var u = get_vpath() + window.location.hash;
|
var u = get_vpath() + window.location.hash;
|
||||||
hist_push(ebi('files').innerHTML, u);
|
hist_replace(ebi('files').innerHTML, u);
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
|
@ -299,3 +299,9 @@ function hist_push(html, url) {
|
||||||
sessionStorage.setItem(key, html);
|
sessionStorage.setItem(key, html);
|
||||||
history.pushState(key, url, url);
|
history.pushState(key, url, url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function hist_replace(html, url) {
|
||||||
|
var key = new Date().getTime();
|
||||||
|
sessionStorage.setItem(key, html);
|
||||||
|
history.replaceState(key, url, url);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue