]> xenbits.xensource.com Git - libvirt.git/commitdiff
docs: Fix searching in the wiki
authorPeter Krempa <pkrempa@redhat.com>
Mon, 13 Mar 2023 12:10:17 +0000 (13:10 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 13 Mar 2023 16:11:17 +0000 (17:11 +0100)
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 <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
docs/js/main.js

index 2edc628304538369b421e118896c2c551f80e1cb..c37f9756a71027eace8a6e57ffd2ca609a0dc1a2 100644 (file)
@@ -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;
     }