TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Any extension or script that lets you tag HN users?

4 点作者 petargyurov超过 2 年前
There are lots of interesting people on HN. Is there a browser extension or script (TamperMonkey?) that lets you create a tag for particular user that is rendered next to their name each time it occurs on the page? I believe Reddit had&#x2F;has this feature but I haven&#x27;t used it in a long time so I don&#x27;t know.<p>Doesn&#x27;t have to be fancy, just something that works. Can save data in localStorage.<p>EDIT: I use Firefox.

3 条评论

nness超过 2 年前
I haven&#x27;t come across any, but its a good feature to have (and a fun coding challenge) so I put together this Tampermonkey script:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;lachlanmcdonald&#x2F;hackernews-user-tags" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lachlanmcdonald&#x2F;hackernews-user-tags</a><p>(not thoroughly tested, so use at your own peril. HN runs in quirks mode and there is some nasty global namespaced JS. If you have any issues, do let me know)
评论 #33081507 未加载
brudgers超过 2 年前
<p><pre><code> &#x2F;&#x2F; ==UserScript== &#x2F;&#x2F; @name HN brudgers &#x2F;&#x2F; @match https:&#x2F;&#x2F;news.ycombinator.com&#x2F;* &#x2F;&#x2F; ==&#x2F;UserScript== for (let link of document.querySelectorAll(&#x27;.hnuser&#x27;)) { if (link.innerText == &#x27;brudgers&#x27; ) { link.style.color = &#x27;blue&#x27;; } } </code></pre> Worth noting that this type of script is fragile.<p>Whenever HN changes it&#x27;s HTML, CSS, Javascript, or code-generating code, it might stop working.
rozenmd超过 2 年前
F5bot scrapes HN for certain strings, you could set it up to look for your username (you get emailed when it sees new occurrences)