use replaceState if available, instead of setting the hash
This commit is contained in:
1 parent
67bf41627d
commit
303c65f2c3
5 files changed
+12
-10
No files matched your search
@@ -225,6 +225,14 @@ define([
|
||||
return secret;
|
||||
};
|
||||
|
||||
var setHash = common.setHash = function (hash) {
|
||||
if (!/^#/.test(hash)) { hash = '#' + hash; }
|
||||
if (window.history && window.history.replaceState) {
|
||||
return void window.history.replaceState({}, window.document.title, hash);
|
||||
}
|
||||
window.location.hash = hash;
|
||||
};
|
||||
|
||||
var storageKey = common.storageKey = 'CryptPad_RECENTPADS';
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user