Show HN: Extension to highlight and tag users on Hacker News
github.com
github.com
// ==UserScript==
// @name Hacker News VIP highlighter
// @version 1
// @grant none
// @match https://news.ycombinator.com/*
// ==/UserScript==
function highlightVIPs() {
'use strict';
const VIPs = [
"WalterBright"
];
const userTags = Array.from(document.getElementsByClassName("hnuser"));
userTags.forEach(tag => {
const username = tag.href.split("=")[1];
if (VIPs.includes(username)) {
tag.style.fontWeight = 'bold';
}
});
}
highlightVIPs();
(I'm not much of a JavaScript programmer, but it seems to work.)https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
It almost makes me think HN should have a related feature, where people can universally stand out, separate from the leaderboard (link at the bottom). But knowing HN's philosophy, I know this would be against the spirit of the humble-meritocracy they're trying to build, and would do more harm than good.
In fact, I even wonder if this HN-Friends extension is going to have an adverse affect on its users. Right now the usernames are (probably intentionally) understated, to draw more attention to the content than the author. If we notice the person, we already have a bias not only toward their comment, but to read their comment before anyone else's. This goes against the meritocracy that I love about HN. But I also wonder how many thread discussion I had where I missed the context of who is talking, and the direction could have gone so much differently because of it.
And even more importantly, I love and encourage this kind of innovation, and don't in any way want to discourage you or anyone from making clever things like this!
This example is great, as it is open source and supports Firefox too. Maybe I'll do both browsers as well! This HN friends extension does most if not all of the primitive things that I will need to do, so I'm being sincere and I think it's a great publish.
I was meaning to write my own userscript / chrome extension to show a button if there's a reddit-thread with same URL trending in hackernews, so you can click and go to those comments. It would say how many comments there are, and pull up the one with the most upvotes/comments within a 6 month timespan.
Haven't gotten around to it yet unless someone else wants to make it
I made one for my favorite notetaking app though, that I use fairly often. I made a write up of things I learned to write it
http://vincentmtang.com/2018/06/29/adventures-in-writing-a-t...
[0] https://github.com/etcet/HNES
[1] https://addons.mozilla.org/en-US/firefox/addon/hnes/
[2] https://chrome.google.com/webstore/detail/bappiabcodbpphnojd...
a.hnuser[href*="id=dewey"] { background-color: orange !important; color: white !important; }