3 ms·
What I want is a way to flag comments, and threads on the homepage with comments, by users I have marked as interesting. This may be an okay proxy, but I have n
by trishume 10y ago
What I want is a way to flag comments, and threads on the homepage with comments, by users I have marked as interesting. This may be an okay proxy, but I have no idea how noisy it is since I normally don't see karma.
There's certain users that (often due to them being experts in a certain area) very often post interesting comments that I learn a lot from. I mainly find them by occasionally reading their comment history, but it would be nice to see them while the discussion is still ongoing.
A few examples: pcwalton, patio11, jblow, WalterBright
- chipperyman573 10y agoSomething like this? You could just package this as an extension or something. var likedUsers = ['pcwalton', 'patio11', 'jblow', 'WalterBright']; var users = document.getElementsByClassName("hnuser"); for (var i = 0; i < users.length; i++) { if (likedUsers.indexOf(users[i].innerHTML) != -1) { users[i].setAttribute("style", "font-weight: bold;"); //Or whatever } }
- thesmallestcat 10y agoWait, not like this? document.documentElement.innerHTML = document.documentElement.innerHTML.replace( new RegExp('(?:' + ['pcwalton', 'patio11', 'jblow', 'WalterBright'].join('|') + ')', 'g'), '<B>$&</B>' ); DHTML!
- chipperyman573 10y agoBecause regex is costly. Your solution takes 27.1 ms on my machine, and my script takes 12.4 ms.
- thesmallestcat 10y ago(It's a joke, with poor delivery it seems. It also pointlessly replaces things in <head>. Also, it clobbers every element on the page, attached event handlers included, so it's expensive and destructive. To be clear, it's expensive because it treats the page as a string rather than using the DOM and replaces every element, not because regular expressions are expensive, which they aren't. As far as string replacements go, it's pretty quick. The underlying joke is it's a 1997 JS novice/Perl monk's attempt at replacing your O(n*m) script, which really needs no optimization, hence the dated <B> and "DHTML!"... I'll see myself out).
- viraptor 10y agoI'm using the HackerTagger extension in Chrome for extra context on the users. You could probably use that to some extent to highlight their posts/comments. (It will not show they commented on somebody else's post though)
- morsch 10y agoSlashdot -- as always the trailblazer in terms of comment self-moderation -- had that feature 10 years ago. You could mark users as friends or foes; their posts would be highlighted and get a (customisable) karma modifier. I don't like the terminology, but I think I like the feature. While having inter-personal vendettas is probably bad for forum culture, it at least facilitates some kind of inter-personal relationships. It's nice to judge each comment on its own merits, but it's also fun and interesting to recognise someone as a peer whose comments you liked -- or disliked! -- before. It's also orthogonal to the karma system. I already have a personal (if completely one sided) relationship to a few prominent hacker news users. But outside of that circle of maybe 5 to 10 people, posts might as well be anonymous. Annotating other users makes it easier to expand this sphere beyond hacker news royalty.
- oblio 10y agoI'd add pjmlp to the list.