mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
docs: update search form to use hyperkitty search
The hyperkitty search facility does a massively better job than google docs for mailing lists. Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
2c01e2d75b
commit
fb9df53960
@ -38,10 +38,11 @@ function advancedsearch(e) {
|
||||
e.stopPropagation();
|
||||
|
||||
var form = document.createElement("form");
|
||||
form.setAttribute("method", "get");
|
||||
form.method = "get";
|
||||
|
||||
var newq = document.createElement("input");
|
||||
newq.setAttribute("type", "hidden");
|
||||
newq.type = "hidden";
|
||||
newq.name = "q";
|
||||
form.appendChild(newq);
|
||||
|
||||
var q = document.getElementById("searchq");
|
||||
@ -54,17 +55,27 @@ function advancedsearch(e) {
|
||||
}
|
||||
}
|
||||
|
||||
form.setAttribute("action", "https://google.com/search");
|
||||
newq.setAttribute("name", "q");
|
||||
|
||||
if (what == "website" || what == "wiki") {
|
||||
form.action = "https://google.com/search";
|
||||
if (what == "website") {
|
||||
newq.value = "site:libvirt.org " + q.value;
|
||||
} else if (what == "wiki") {
|
||||
} else {
|
||||
newq.value = "site:wiki.libvirt.org " + q.value;
|
||||
} else if (what == "devs") {
|
||||
newq.value = "site:redhat.com/archives/libvir-list " + q.value;
|
||||
} else if (what == "users") {
|
||||
newq.value = "site:redhat.com/archives/libvirt-users " + q.value;
|
||||
}
|
||||
} else if (what == "devs" || "users") {
|
||||
form.action = "https://lists.libvirt.org/archives/search";
|
||||
newq.value = q.value;
|
||||
|
||||
var newl = document.createElement("input");
|
||||
newl.type = "hidden";
|
||||
newl.name = "mlist";
|
||||
form.appendChild(newl);
|
||||
|
||||
if (what == "devs") {
|
||||
newl.value = "devel@lists.libvirt.org";
|
||||
} else {
|
||||
newl.value = "users@lists.libvirt.org";
|
||||
}
|
||||
}
|
||||
|
||||
document.body.appendChild(form);
|
||||
|
Loading…
Reference in New Issue
Block a user