Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Any extension or script that lets you tag HN users?
4 points by petargyurov on Oct 4, 2022 | hide | past | favorite | 5 comments
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/has this feature but I haven't used it in a long time so I don't know.

Doesn't have to be fancy, just something that works. Can save data in localStorage.

EDIT: I use Firefox.




I haven't come across any, but its a good feature to have (and a fun coding challenge) so I put together this Tampermonkey script:

https://github.com/lachlanmcdonald/hackernews-user-tags

(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)


Wow, amazing! Thank you!

The tooltip that pops up can be quite off sometimes in terms of position, but otherwise it seems to work really well!

You should do a Show HN for sure!

EDIT: you're now tagged as "tag-legend"


Not a problem, one of those days with too much free time and in a coding mood.

I fixed a number of issues around styling, positioning, and some conflicts with HN's own JavaScript:

https://github.com/lachlanmcdonald/hackernews-user-tags/blob...

(Good idea, I'll do a little more testing and post a Show HN.)


  // ==UserScript==
    // @name     HN brudgers
    // @match  https://news.ycombinator.com/*
    // ==/UserScript==
    for (let link of document.querySelectorAll('.hnuser')) {
      if (link.innerText == 'brudgers' ) {
        link.style.color = 'blue';
      }
    }
Worth noting that this type of script is fragile.

Whenever HN changes it's HTML, CSS, Javascript, or code-generating code, it might stop working.


F5bot scrapes HN for certain strings, you could set it up to look for your username (you get emailed when it sees new occurrences)




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: