Remove # symbol when no hash

This commit is contained in:
yflory 2020-01-27 13:37:52 +01:00
parent a8e6250576
commit 2c1e26cb52
5 changed files with 5 additions and 5 deletions

View File

@ -24,7 +24,7 @@ define([
// Hidden hash // Hidden hash
hash = window.location.hash; hash = window.location.hash;
href = window.location.href; href = window.location.href;
if (window.history && window.history.replaceState) { if (window.history && window.history.replaceState && hash) {
window.history.replaceState({}, window.document.title, '#'); window.history.replaceState({}, window.document.title, '#');
} }
document.getElementById('sbox-iframe').setAttribute('src', document.getElementById('sbox-iframe').setAttribute('src',

View File

@ -23,7 +23,7 @@ define([
// Hidden hash // Hidden hash
hash = window.location.hash; hash = window.location.hash;
href = window.location.href; href = window.location.href;
if (window.history && window.history.replaceState) { if (window.history && window.history.replaceState && hash) {
window.history.replaceState({}, window.document.title, '#'); window.history.replaceState({}, window.document.title, '#');
} }

View File

@ -24,7 +24,7 @@ define([
// Hidden hash // Hidden hash
hash = window.location.hash; hash = window.location.hash;
href = window.location.href; href = window.location.href;
if (window.history && window.history.replaceState) { if (window.history && window.history.replaceState && hash) {
window.history.replaceState({}, window.document.title, '#'); window.history.replaceState({}, window.document.title, '#');
} }

View File

@ -24,7 +24,7 @@ define([
// Hidden hash // Hidden hash
hash = window.location.hash; hash = window.location.hash;
href = window.location.href; href = window.location.href;
if (window.history && window.history.replaceState) { if (window.history && window.history.replaceState && hash) {
window.history.replaceState({}, window.document.title, '#'); window.history.replaceState({}, window.document.title, '#');
} }

View File

@ -24,7 +24,7 @@ define([
// Hidden hash // Hidden hash
hash = window.location.hash; hash = window.location.hash;
href = window.location.href; href = window.location.href;
if (window.history && window.history.replaceState) { if (window.history && window.history.replaceState && hash) {
window.history.replaceState({}, window.document.title, '#'); window.history.replaceState({}, window.document.title, '#');
} }