Show HN: I created a Chrome extension that reveals HN's hidden comment scores.(chrome.google.com)
chrome.google.com
Show HN: I created a Chrome extension that reveals HN's hidden comment scores.
https://chrome.google.com/webstore/detail/kpmlnebfcgjcohlbodopejeiodegedap
2 comments
[deleted]
How does it get the data?
Looking at the js file in the extension, I see an AJAX call made to this:
http://api.thriftdb.com/api.hnsearch.com/...
Not sure, but thriftdb might be the source. But, I'm curious too.Yes. The comment score is queried from HNSearch's API. This extension was my submission to the HNSearch API contest under the name "HN Reveal":
http://news.ycombinator.com/item?id=2672793
Now, since the beginning of the API contest announcement, HNSearch's API does not reveal score for comments that are less than 5 days old. After studying the API, I figured out a way to bypass this restriction. If you construct a faceted query for the "points" field with a search query that is narrow enough to get exactly 1 hit, the facet result will reveal the vote score for that comment (e.g. "9 points" has 1 hit).
When I submitted my entry to HNSearch, Andres emailed me back and told me to disable revealing vote scores for comments that are less than 5 days old. In addition, they modified their API to restrict my query.
http://news.ycombinator.com/item?id=2672793
Now, since the beginning of the API contest announcement, HNSearch's API does not reveal score for comments that are less than 5 days old. After studying the API, I figured out a way to bypass this restriction. If you construct a faceted query for the "points" field with a search query that is narrow enough to get exactly 1 hit, the facet result will reveal the vote score for that comment (e.g. "9 points" has 1 hit).
When I submitted my entry to HNSearch, Andres emailed me back and told me to disable revealing vote scores for comments that are less than 5 days old. In addition, they modified their API to restrict my query.
[deleted]