Add data-ranking attribute to each HTML search item.

This commit is contained in:
JeremyRand 2017-08-28 14:33:53 +00:00
parent 8e4f31bdc7
commit 61be709a97
No known key found for this signature in database
GPG Key ID: B3F2D165786D6570
2 changed files with 2 additions and 1 deletions

View File

@ -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="" />

View File

@ -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));