3 ms·
Seems like a great idea! Just yesterday I created hn-comments[1], a collection of great comments made on HN. Can I embed a single comment as well? Edited for cl
by capex 10y ago
Seems like a great idea! Just yesterday I created hn-comments[1], a collection of great comments made on HN. Can I embed a single comment as well?
Edited for clarity.
[1] https://medium.com/hn-comments https://medium.com/hn-comments
- franciscop 10y agoThere is a `sort` and a `limit` parameters so you might be able to work with these if it happens that the comment is in a specified place, but that's really hacky. Otherwise, I could think about adding filters such as: <comment-box hackernews="11850599" filter="id:3243534" class="border"></comment-box> However arguably this is useful because you can show N comments and the UI is made around that. You could also just hide everything else through CSS though: https://jsfiddle.net/franciscop/fygps59v/2/ https://jsfiddle.net/franciscop/fygps59v/2/ comment-box .comment, comment-box .add { display: none; } comment-box #id-12898146 { display: block; }
- capex 10y agoSo every comment has its own id?
- franciscop 10y agoIn the back-end yes, and now in the front-end also (just pushed that update). They are identified in the list as: <li class="comment" id="id-6547567" class="ind-1">...</li> See updated answer and jsfiddle above