Update htroot compare_yacy servlet

- removed metager2.de -> is down

for me also others didn't work today (but left unchanged)
but added a html onerror event to inform if connection was refused.
pull/461/head
unknown 3 years ago
parent 96e44e11bb
commit a0f6c3be00

@ -21,13 +21,13 @@
<form action="" method="get" accept-charset="UTF-8">
<p><input type="text" class="searchinput" name="query" value="#[search_query]#" size="40" onFocus="this.select()"/> <input type="submit" class="btn btn-primary" value="Compare" />
Left Search Engine
<select name="left">
<select id="selforobjleft" name="left">
#{searchengines}#
<option #(leftengine)#::selected="selected"#(/leftengine)#>#[searchengine]#</option>
#{/searchengines}#
</select>
&nbsp;&nbsp;Right Search Engine
<select name="right">
<select id="selforobjright" name="right">
#{searchengines}#
<option #(rightengine)#::selected="selected"#(/rightengine)#>#[searchengine]#</option>
#{/searchengines}#
@ -40,8 +40,16 @@
::
<fieldset>
<legend>Search Result</legend>
<object type="text/html" data="#[left]##[query]#" style="width:49%;height:1600px;overflow:scroll;"></object>
<object type="text/html" data="#[right]##[query]#" style="width:49%;height:1600px;overflow:scroll;"></object>
<object id="objleft" onerror="loadErrorFunction('objleft')" type="text/html" data="#[left]##[query]#" style="width:49%;height:1600px;overflow:scroll;min-width:30%;"></object>
<object id="objright" onerror="loadErrorFunction('objright')" type="text/html" data="#[right]##[query]#" style="width:49%;height:1600px;overflow:scroll;">loading....</object>
<script>
function loadErrorFunction(theObject) {
var htobj = document.getElementById(theObject);
htobj.innerHTML = "&nbsp;&nbsp;&nbsp;Error: no results received... from " + document.getElementById("selfor"+theObject).value + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
htobj.style.verticalAlign = "top";
htobj.style.color = "red";
}
</script>
</fieldset>
#(/search)#
#%env/templates/footer.template%#

@ -44,9 +44,7 @@ public class compare_yacy {
//searchengines.put("google.com", "https://www.google.com/#q=");
searchengines.put("startpage.com", "https://startpage.com/do/search?cat=web&query=");
searchengines.put("bing.com", "https://www.bing.com/search?q=");
searchengines.put("metager.de", "https://www.metager.de/meta/cgi-bin/meta.ger1?eingabe=");
searchengines.put("metager2.de (web)", "https://www.metager2.de/search.php?ses=web&q=");
searchengines.put("metager2.de (international)", "https://www.metager2.de/search.php?ses=international&q=");
searchengines.put("metager.de", "https://metager.de/meta/meta.ger3?eingabe="); // see https://gitlab.metager.de/open-source/MetaGer/-/blob/development/resources/lang/de/help/help-functions.php#L37
//searchengines.put("yahoo.com", "https://search.yahoo.com/search?p="); // no search service in iframe 2016-08-17 : "Load denied by X-Frame-Options: does not permit cross-origin framing."
//searchengines.put("romso.de", "http://romso.de/?q="); // no search service 2016-01-02
searchengines.put("Wikipedia English", "https://en.wikipedia.org/wiki/");

Loading…
Cancel
Save