diff --git a/layouts/page/search.html b/layouts/page/search.html
index a2e98c9..81b1d75 100644
--- a/layouts/page/search.html
+++ b/layouts/page/search.html
@@ -23,20 +23,8 @@
window.searchResultTitleTemplate = "{{ T `search.resultTitle` }}"
-{{- $searchfunc := "" -}}
{{- $opts := dict "minify" hugo.IsProduction "JSXFactory" "createElement" -}}
-{{- if eq .Site.Params.widgets.search.mode "original" -}}
- {{- $searchfunc = "ts/search.tsx" -}}
-{{- else if eq .Site.Params.widgets.search.mode "nohighlight" -}}
- {{- $searchfunc = "ts/search_nohl.tsx" -}}
-{{- else if eq .Site.Params.widgets.search.mode "wholeword" -}}
- {{- $searchfunc = "ts/search_ww.tsx" -}}
-{{- else if eq .Site.Params.widgets.search.mode "highlight" -}}
- {{- $searchfunc = "ts/search_hl.tsx" -}}
-{{- else -}}
- {{ warnf "Searching function not defined" }}
-{{- end -}}
-{{- $searchScript := resources.Get $searchfunc | js.Build $opts -}}
+{{- $searchScript := resources.Get "ts/search.tsx" | js.Build $opts -}}
{{ partialCached "footer/footer" . }}