Live data from Hacker News

Show HN: HNCute, a pretty pink Hacker News theme

chrome.google.com

61–70 of 85 posts

Re: Show HN: HNCute, a pretty pink Hacker News theme

#61
post #5

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?

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

#62
I 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 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

#63
post #5

Earlier 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?

Seems like you didn't install it after all!

Re: Show HN: HNCute, a pretty pink Hacker News theme

#64

Earlier quoted context omitted.

Pardon my ignorance, but what's racist?

They're referring to the POTUS campaign slogan, which isn't overtly racist but can be interpreted in such a way depending on your read of the message.

Oh that is quite a generalisation!

Re: Show HN: HNCute, a pretty pink Hacker News theme

#65
post #62

I 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…

Thanks so much! I'm glad you decided to install it, feel free to let me know if you see anything that could be improved. I was inspired by the color scheme from Bubblesort's "Git it Gurl" shirts (https://shop.bubblesort.io/products/git-it-gurl-shirt?varian...), with the nice splash of blue-purple on the pink background.

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.

I thought about this and wound up changing the wording, the changes should be live with the next update within the next hour

Re: Show HN: HNCute, a pretty pink Hacker News theme

#68
post #62

I 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…

My topcolor is #abcdef. I’m also quite fond of #123456 (though not as a topcolor).

Re: Show HN: HNCute, a pretty pink Hacker News theme

#69

Why 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…

You can change the colour of the logo with CSS filters, something like this:

  [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.
Post reply on HN