why is this even on the top? no offense but it is a css stylesheet.
You should install it and then try reading your own grumpy comment again. See?
Show HN: HNCute, a pretty pink Hacker News theme
61–70 of 85 posts
Re: Show HN: HNCute, a pretty pink Hacker News theme
#62But after reading some of the other comments I decided to add the plugin and am feeling that I won't regret it :) Not only do I love the use of pink in general, I love this theme's particular choices, such as the blue accent for the headline links and the muted pink for visited links for even better minimalist readability. The minimized header is a also nice touch (though maybe `new`, `threads`, and `submit` deserve emphasis -- at least based on my habits). And I guess if I want my web browser not to scream "HACKER NEWS READER" to anyone looking over my shoulder, a theme that hides the "Hacker News" header in addition to adding a pink explosion will do the trick. Thanks!
Re: Show HN: HNCute, a pretty pink Hacker News theme
#63Earlier quoted context omitted.
You should install it and then try reading your own grumpy comment again. See?
your comment can be said to be grumpy also. See? sorry i dont get why people are salty, I dont find it interesting and just wondered what people found interesting. Why do you have to get defensive?
Re: Show HN: HNCute, a pretty pink Hacker News theme
#64Re: Show HN: HNCute, a pretty pink Hacker News theme
#65I upvoted this like I try to do for most good effort/well-intentioned Show HN's, but I wasn't planning on installing it since I had customized my HN settings to make my HN usage as discrete as possible, with `topcolor` set to #f6f6ef (wish bodycolor was also a setting so I could just make the header and the HN body #eeeeee!). But after reading some of the other comments I decided to add the plugin and am feeling that…
Re: Show HN: HNCute, a pretty pink Hacker News theme
#66Instant upvote to anyone who forks it to append cat and giggle emojis to any post that references the chrome extension. "Why is HNCutePlus on Hacker news?" giggles kittens
Re: Show HN: HNCute, a pretty pink Hacker News theme
#67> make HN cute again Can we stop using “make X Y again”? The phrase it references is a racist dogwhistle. Let’s not normalize it.
Re: Show HN: HNCute, a pretty pink Hacker News theme
#68I upvoted this like I try to do for most good effort/well-intentioned Show HN's, but I wasn't planning on installing it since I had customized my HN settings to make my HN usage as discrete as possible, with `topcolor` set to #f6f6ef (wish bodycolor was also a setting so I could just make the header and the HN body #eeeeee!). But after reading some of the other comments I decided to add the plugin and am feeling that…
Re: Show HN: HNCute, a pretty pink Hacker News theme
#69Why is it a Chrome extension instead of just a bit of CSS in one of the many custom CSS extensions that already abound?
Mostly because I'm familiar with developing Chrome extensions, and appreciate the freedom and ease of distribution. I also used a bit of Javascript to rework some of the text areas, like the bar at the top. And injecting the favicon is done in JS as well. I'll look into custom CSS extensions though! I'm not familiar with them. The repo is at https://github.com/carolinehermans/HNcute – it could definitely be organized…
[href="https://news.ycombinator.com"] > img {
filter: hue-rotate(-50deg) brightness(150%);
}
… but that doesn’t fix the favicon.Some of the other bits done in JS can be done in CSS; this snippet, for example:
for (let i = 0; i
This is very inefficient (though document.getElementsByTagName is probably O(1) due to its return type HTMLCollection being live, so the end result is probably still only O(n) on the number of elements in the document; it’d be O(n²) with document.querySelectorAll); you should only get the elements once, like this: const fontElements = document.getElementsByTagName("font");
for (let i = 0; i
It can still be made more efficient, but all I wanted to do was rewrite it in CSS anyway: font[color="#ff6600"] {
color: #ff83c6;
}
Same deal on the table cells just above it: for (let i = 0; i
Use this CSS instead: td[bgcolor="#ff6600"] {
background-color: #fbbfdf;
}
On the performance matter, a rule of thumb: don’t call getElementsByTagName, getElementsByClassName, querySelector and querySelectorAll more than you absolutely have to. Or anything, really. Cache things in temporary variables aggressively. Take these two lines, for example: document.getElementsByClassName("pagetop")[0].innerHTML = document.getElementsByClassName("pagetop")[0].innerHTML.split("|").join(" ")
document.getElementsByClassName("pagetop")[1].innerHTML = document.getElementsByClassName("pagetop")[1].innerHTML.split("|").join(" ")
You’ve evaluated `document.getElementsByClassName("pagetop")` four times instead of once. const pagetops = document.getElementsByClassName("pagetop");
pagetops[0].innerHTML = pagetops[0].innerHTML.split("|").join(" ")
pagetops[1].innerHTML = pagetops[1].innerHTML.split("|").join(" ")
Even then, this indexes pagetops twice as often as is necessary, but that operation is quite a bit cheaper than getElementsByClassName. I’d say then to use for..of or forEach or similar, or assign temporaries.Re: Show HN: HNCute, a pretty pink Hacker News theme
#70> make HN cute again Can we stop using “make X Y again”? The phrase it references is a racist dogwhistle. Let’s not normalize it.