mirror of
https://github.com/9001/copyparty.git
synced 2026-06-22 05:53:29 -06:00
keep hash clean (browser nav to # was broken)
This commit is contained in:
parent
d42b51cdc2
commit
e67ec978f7
|
|
@ -1662,6 +1662,10 @@ function goto(dest) {
|
||||||
|
|
||||||
window.onhashchange = function() {
|
window.onhashchange = function() {
|
||||||
console.log('hash change: ' + location.hash)
|
console.log('hash change: ' + location.hash)
|
||||||
|
// keep it clean
|
||||||
|
if(location.hash == '')
|
||||||
|
hist_replace(location.pathname + location.search);
|
||||||
|
|
||||||
var a_modal = QS('.modal.vis');
|
var a_modal = QS('.modal.vis');
|
||||||
if(location.hash.length <= 1 && a_modal){
|
if(location.hash.length <= 1 && a_modal){
|
||||||
modaltoggle(a_modal.id);
|
modaltoggle(a_modal.id);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue