3 ms·
No I want to save what HN is use and add it to something like TamperMonkey user scripts so I get the alternating colors for HN permanently. I tried before but I
by brightmood 9mo ago
No I want to save what HN is use and add it to something like TamperMonkey user scripts so I get the alternating colors for HN permanently.
I tried before but I failed. Do you know of a solution?
- baobun 9mo agoSince it's not done via CSS here, I suggest not copying the existing approach directly but recreating the same effect using CSS only. If you look in the DOM tree / source like I proposed, you see that the list is already a table, so you can use that exact approach you already mentioned. table tr:nth-child(odd) td.rank{ color: red; } table tr:nth-child(even) td.rank{ color: green; } https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:nth-child https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/S...