Include leading slash in path replacement for result config changes
parent
3f363b0175
commit
aa198ed562
|
@ -6,7 +6,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
|
||||||
countrySelect.onchange = () => {
|
countrySelect.onchange = () => {
|
||||||
let str = window.location.href;
|
let str = window.location.href;
|
||||||
n = str.lastIndexOf("search");
|
n = str.lastIndexOf("/search");
|
||||||
if (n > 0) {
|
if (n > 0) {
|
||||||
str = str.substring(0, n) +
|
str = str.substring(0, n) +
|
||||||
`search?q=${searchBar.value}&country=${countrySelect.value}`;
|
`search?q=${searchBar.value}&country=${countrySelect.value}`;
|
||||||
|
|
Loading…
Reference in New Issue