TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Can someone with enough Karma to downvote help me out with snippet?

1 pointsby markbranlyabout 1 year ago
I&#x27;m working on a Hacker News UserStyle that will be a full site redesign but I lack enough karma to downvote.<p>I got the markup for those in a previous Ask HN [1]. Sadly, I didn&#x27;t think to ask for markup for something upvoted and something downvoted.<p>What I need is this snippet (the two table rows that comprise a submission and its actions):<p><pre><code> &lt;tr class=&quot;athing&quot; id=&quot;123456789&quot;&gt; &lt;td align=&quot;right&quot; valign=&quot;top&quot; class=&quot;title&quot;&gt; &lt;span class=&quot;rank&quot;&gt;10.&lt;&#x2F;span&gt; &lt;&#x2F;td&gt; &lt;td valign=&quot;top&quot; class=&quot;votelinks&quot;&gt; &lt;center&gt; &lt;a id=&quot;up_123456789&quot; class=&quot;clicky nosee&quot; href=&quot;vote?id=123456789&amp;amp;how=up&amp;amp;auth=xxxxxx&amp;amp;goto=upvoted%3Fid%3Dmarkbranly&quot; &gt;&lt;div class=&quot;votearrow&quot; title=&quot;upvote&quot;&gt;&lt;&#x2F;div &gt;&lt;&#x2F;a&gt; &lt;&#x2F;center&gt; &lt;&#x2F;td&gt; &lt;td class=&quot;title&quot;&gt; &lt;span class=&quot;titleline&quot; &gt;&lt;a href=&quot;https:&#x2F;&#x2F;example.com&#x2F;submission-url&#x2F;&quot; &gt;The Title of the Submission&lt;&#x2F;a &gt;&lt;span class=&quot;sitebit comhead&quot;&gt; (&lt;a href=&quot;from?site=example.com&quot;&gt;&lt;span class=&quot;sitestr&quot;&gt;example&lt;&#x2F;span&gt;&lt;&#x2F;a &gt;)&lt;&#x2F;span &gt;&lt;&#x2F;span &gt; &lt;&#x2F;td&gt; &lt;&#x2F;tr&gt; &lt;tr&gt; &lt;td colspan=&quot;2&quot;&gt;&lt;&#x2F;td&gt; &lt;td class=&quot;subtext&quot;&gt; &lt;span class=&quot;subline&quot;&gt; &lt;span class=&quot;score&quot; id=&quot;score_123456789&quot;&gt;100 points&lt;&#x2F;span&gt; by &lt;a href=&quot;user?id=theusername&quot; class=&quot;hnuser&quot;&gt;theusername&lt;&#x2F;a&gt; &lt;span class=&quot;age&quot; title=&quot;2024-04-01T00:00:00&quot; &gt;&lt;a href=&quot;item?id=123456789&quot;&gt;20 days ago&lt;&#x2F;a&gt;&lt;&#x2F;span &gt; &lt;span id=&quot;unv_123456789&quot;&gt;&lt;&#x2F;span&gt; | &lt;a href=&quot;item?id=123456789&quot;&gt;500&amp;nbsp;comments&lt;&#x2F;a&gt; &lt;&#x2F;span&gt; &lt;&#x2F;td&gt; &lt;&#x2F;tr&gt; </code></pre> Thanks for your help. This is the last thing I need and I can&#x27;t wait to Show HN!<p>[1] https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=39791679

1 comment

bhaneyabout 1 year ago
The downvote arrow is pretty much identical to the upvote arrow markup-wise. It&#x27;s just another &lt;a&gt; element right after the upvote&#x27;s &lt;a&gt; element, with the only difference being that the div inside has the &quot;rotate180&quot; class in addition to the &quot;votearrow&quot; class (and a different title&#x2F;href, but that shouldn&#x27;t matter to your styling).<p>If you&#x27;ve upvoted or downvoted, all vote arrows become &quot;nosee&quot;
评论 #39933968 未加载