Skip to content

Commit 8fde2db

Browse files
committed
Search: Fix adding to history when updating hash
1 parent c04ed52 commit 8fde2db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@
102102
{
103103
if (this.value == "")
104104
{
105-
location.hash = "";
105+
history.replaceState({}, undefined, "/");
106106
document.getElementById("results").innerHTML = "";
107107
}
108108
else
109109
{
110-
location.hash = "q=" + encodeURIComponent(this.value);
110+
history.replaceState({}, undefined, "/#q=" + encodeURIComponent(this.value));
111111
doQuery(this.value);
112112
}
113113
};

0 commit comments

Comments
 (0)