From c434a7e48faff075ef9e40b483519910c4ee360c Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Mon, 13 Mar 2023 13:10:17 +0100 Subject: [PATCH] docs: Fix searching in the wiki MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Conversion of the wiki to static pages means that the integrated search no longer functions. Use the same approach we have for other search to simply defer to google. Signed-off-by: Peter Krempa Reviewed-by: Daniel P. Berrangé --- docs/js/main.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/docs/js/main.js b/docs/js/main.js index 2edc628304..c37f9756a7 100644 --- a/docs/js/main.js +++ b/docs/js/main.js @@ -54,21 +54,16 @@ function advancedsearch(e) { } } + form.setAttribute("action", "https://google.com/search"); + newq.setAttribute("name", "q"); + if (what == "website") { - form.setAttribute("action", "https://google.com/search"); - newq.setAttribute("name", "q"); newq.value = "site:libvirt.org " + q.value; } else if (what == "wiki") { - form.setAttribute("action", "https://wiki.libvirt.org/index.php"); - newq.setAttribute("name", "search"); - newq.value = q.value; + newq.value = "site:wiki.libvirt.org " + q.value; } else if (what == "devs") { - form.setAttribute("action", "https://google.com/search"); - newq.setAttribute("name", "q"); newq.value = "site:redhat.com/archives/libvir-list " + q.value; } else if (what == "users") { - form.setAttribute("action", "https://google.com/search"); - newq.setAttribute("name", "q"); newq.value = "site:redhat.com/archives/libvirt-users " + q.value; } -- 2.47.2