Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

Add data-ranking attribute to each HTML search item.

JeremyRand61be709a976f
diff --git a/htroot/yacysearchitem.html b/htroot/yacysearchitem.html
index aa12fd51a..668e23c18 100644
--- a/htroot/yacysearchitem.html
+++ b/htroot/yacysearchitem.html
@@ -1,5 +1,5 @@
#(content)#::
- <div class="searchresults">
+ <div class="searchresults" data-ranking="#[ranking]#">
<h4 class="linktitle">
#(favicon)#::
<img width="16" height="16" src="#[faviconUrl]#" id="f#[urlhash]#" class="favicon" style="width:16px; height:16px;" alt="" />
diff --git a/htroot/yacysearchitem.java b/htroot/yacysearchitem.java
index 9d145bbfe..bdbd9fc51 100644
--- a/htroot/yacysearchitem.java
+++ b/htroot/yacysearchitem.java
@@ -279,6 +279,7 @@ public class yacysearchitem {
prop.put("content_showSnapshots_link", snapshotPaths.iterator().next().getAbsolutePath());
}
prop.put("content_showRanking_ranking", Float.toString(result.score()));
+ prop.put("content_ranking", Float.toString(result.score()));
}
prop.put("content_urlhexhash", Seed.b64Hash2hexHash(urlhash));
prop.putHTML("content_urlname", nxTools.shortenURLString(result.urlname(), MAX_URL_LENGTH));