X-Git-Url: https://fpunktk.de/gitweb/?p=consearch.git;a=blobdiff_plain;f=index.php;h=3f1966dc993291449dcfece9a5dbc18444627075;hp=cda4e5d394b17fc67d08eb1849597b5ccf80358f;hb=4da2fde952254a7571c58fbf3085917f2846fe2c;hpb=f4556a4da52227cf8def049e206e5705a673a74e;ds=sidebyside diff --git a/index.php b/index.php index cda4e5d..3f1966d 100644 --- a/index.php +++ b/index.php @@ -159,17 +159,22 @@ function parse_fragmentstring() { document.getElementById("querystring").focus(); } else { fragmentarr = fragmentstring.replace("%20", "+").split("+"); - if ( se[fragmentarr[0]] ) { - // first word in query is a keyword - kw = fragmentarr[0]; + kw = fragmentarr[0]; + if ( se[kw] ) { + // first word in query is a search engine keyword fragmentarr.shift(); location.href = se[kw][1] + fragmentarr.join(" "); } else { - // there is no keyword