mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-28 19:43:31 +08:00
Merge 9bce57279a
into 9e6b7b22a9
This commit is contained in:
commit
eaf4ba2bd1
@ -36,10 +36,10 @@
|
|||||||
const wrongUrl = new URL(window.location.href);
|
const wrongUrl = new URL(window.location.href);
|
||||||
|
|
||||||
/// Get the search keyword from the wrong URL by removing all slashes and dashes
|
/// Get the search keyword from the wrong URL by removing all slashes and dashes
|
||||||
const searchKeyword = wrongUrl.pathname.split(/[/|-]/).join(' ').trim();
|
const searchKeyword = decodeURIComponent(wrongUrl.pathname).split(/[/|-]/).join(' ').trim();
|
||||||
|
|
||||||
document.getElementById('searchInput').setAttribute('value', searchKeyword);
|
document.getElementById('searchInput').setAttribute('value', searchKeyword);
|
||||||
</script>
|
</script>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ partialCached "footer/footer" . }}
|
{{ partialCached "footer/footer" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user