Don't fill history with garbage
This commit is contained in:
parent
8c38991f5b
commit
24cc765027
|
@ -23,7 +23,11 @@ function getHashData() {
|
|||
function setHashData(data) {
|
||||
const text = JSON.stringify({ ...getHashData(), ...data });
|
||||
const compressed = deflate(text, { level: 9 });
|
||||
window.location.hash = encodeURIComponent(fromByteArray(compressed));
|
||||
window.history.replaceState(
|
||||
undefined,
|
||||
"",
|
||||
"#" + encodeURIComponent(fromByteArray(compressed))
|
||||
);
|
||||
}
|
||||
|
||||
export default function PlaygroundPage() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user