JavaScriptファイルsearch.jsに存在する外部関数GoSearchがあります
GoSearch 関数のプライベート/ローカル変数 (b) をオーバーライドする方法。例変数 b="?" を変更します。b="?cs=このサイト&u=http://google.com" へ
GoSearch(q, G, p, E, r, F, D, C, B, j, n, z, y, x, w, A, l, v) {
ULShpi: ;
try {
AddSearchoptionsToQuery()
} catch (H) {}
var i = document.forms[0].elements[G].value;
i = i.replace(/\s*$/, "");
var u = "1";
if (q) u = document.forms[0].elements[q].Value;
if (i == "" || u == "0") {
alert(v);
if (null != event) {
event.returnValue = false;
return false
} else return
}
var b = "?";
if (suggestedQuery) b += "sq=1&";
b += "k=" + encodeURIComponent(i);
for (var k = ["rm", "rm1", "rm2", "rm3", "rm4", "rm5", "ql", "ql1", "ql2", "ql3", "ql4", "ql5", "v", "v1", "v2", "v3", "v4", "v5", "hs", "hs1", "hs2", "hs3", "hs4", "hs5"], h = 0; h < k.length; h++) {
var m = GetUrlKeyValue(k[h], true);
if (m && m.length > 0) b += "&" + k[h] + "=" + m
}
if (l != null && l != "") b += "&r=" + encodeURIComponent(l);
if (null != p) {
var t = document.forms[0].elements[p].value;
if (E) b += canonicalizedUtf8FromUnicode(" " + t);
else b += "&a=" + canonicalizedUtf8FromUnicode(" " + t)
}
var a = null,
c = "",
d = "",
o = null != j;
if (o) {
c = j;
d = j
} else if (r) {
a = document.forms[0].elements[F];
c = a.options[a.selectedIndex].getAttribute("scope");
d = a.options[a.selectedIndex].value
}
if (r || o) {
var f = "",
g = "",
e = false;
if (d == z) {
f = d;
c = "";
g = document.forms[0].elements[D].value;
e = true
}
if (d == y) {
f = d;
c = "";
g = document.forms[0].elements[C].value;
e = true
}
if (d == x) {
f = c;
c = "";
g = document.forms[0].elements[B].value;
e = true
}
if (c == w) {
c = a.options[a.selectedIndex].value;
e = true
}
if (e) n = A;
if (c != "") {
b += "&s=" + encodeURIComponent(c);
if (a.options[a.selectedIndex].value != "" && !e) n = a.options[a.selectedIndex].value
}
if (f != "") b += "&cs=" + encodeURIComponent(f);
if (g != "") b += "&u=" + encodeURIComponent(g)
}
var I = document.forms[0];
try {
external.AutoCompleteSaveForm(I)
} catch (s) {}
window.location = n + b;
try {
if (null != event) event.returnValue = false
} catch (s) {}
return
}