hide results with wrong("red") snippet.

(maybe not as default? But it works pretty good for me)


git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3842 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
allo 18 years ago
parent 7a5b22a0b8
commit 38c180b28b

@ -49,6 +49,12 @@ function requestImageSnippet(url, query){
request.send(null); request.send(null);
} }
function show_hidden_results(){
results=document.getElementsByName("searchresults");
for(i=0;i<results.length;i++){
results[i].setAttribute("style", "display: visible");
}
}
function handleTextState(req) { function handleTextState(req) {
if(req.readyState != 4){ if(req.readyState != 4){
return; return;
@ -68,6 +74,8 @@ function handleTextState(req) {
span.className = "snippetLoaded"; span.className = "snippetLoaded";
} else { } else {
span.className = "snippetError"; span.className = "snippetError";
span.parentNode.parentNode.setAttribute("style", "display: none");
document.getElementById("hidden_results").innerHTML='Some results were hidden, because they do not contain your searchwords anymore, or because they are not accessible. Click here to <a href="javascript:show_hidden_results()">show them</a>';
} }
// replace "<b>" text by <strong> node // replace "<b>" text by <strong> node
@ -212,4 +220,4 @@ function addHover() {
} }
} }
} }
} }

@ -134,10 +134,10 @@ document.getElementById("Enter").value = "search again - catch up more links";
</p> </p>
#(/combine)# #(/combine)#
<!-- linklist begin --> <!-- linklist begin -->
<div id="hidden_results"></div>
#{results}# #{results}#
<!-- link begin --> <!-- link begin -->
<div class="searchresults"> <div class="searchresults" name="searchresults">
#(authorized)#:: #(authorized)#::
<div class="urlactions"> <div class="urlactions">
<a href="/Bookmarks.html?edit=#[urlhash]#" class="bookmarklink" title="bookmark"><img src="/env/grafics/empty.gif" title="bookmark" alt="bookmark" class="bookmarkIcon" /></a> <a href="/Bookmarks.html?edit=#[urlhash]#" class="bookmarklink" title="bookmark"><img src="/env/grafics/empty.gif" title="bookmark" alt="bookmark" class="bookmarkIcon" /></a>
@ -233,4 +233,4 @@ document.getElementById("Enter").value = "search again - catch up more links";
#(/display)# #(/display)#
</body> </body>
</html> </html>

Loading…
Cancel
Save