3 ms·
I also like to read the homepage chronologically. I use a bookmarklet to do this: https://x.com/marekgibney/status/1551483561621979136 https://x.com/marekgibne
by mg 2y ago
I also like to read the homepage chronologically. I use a bookmarklet to do this:
https://x.com/marekgibney/status/1551483561621979136 https://x.com/marekgibney/status/1551483561621979136
This is how I have been reading HN for years now.
It jumps to the next newest post every time it is clicked.
I updated it with a few comfort functions meanwhile. When clicked while not on HN, it goes to HN. And keyboard navigation is possible by pressing "n" to get to the next post.
It also works in threads and on the "comments by user" pages. So for example to see new replies to my own comments, I go to my comments page and use it there.
This is the most recent version:
javascript:(function()%7Bif%20(!location.href.match('ycom'))%0A%20%20%20%20location.href%3D'https%3A%2F%2Fnews.ycombinator.com'%3B%0A%0AdoTheMagic%20%3D%20function()%20%7B%0A%20%20%20%20if%20(typeof%20e!%3D%3D'undefined')%0A%20%20%20%20%20%20%20%20e.style.background%3D'%23c0c0c0'%3B%0A%0A%20%20%20%20e%3DArray.from(document.querySelectorAll('.age%20a%3Anot(.seen)')).sort().at(-1)%3Be.style.background%3D'%23ff0'%3B%0A%20%20%20%20e.classList.add('seen')%3B%0A%20%20%20%20e.scrollIntoView(%7Bbehavior%3A%22smooth%22%2Cblock%3A%22center%22%2Cinline%3A%22nearest%22%7D)%3B%0A%7D%0A%0AdoTheMagic()%3B%0A%0Aif%20(typeof%20theMagicIsActive%3D%3D'undefined')%20%7B%0A%20%20%20%20document.addEventListener(%22keydown%22%2C%20function(evnt)%20%7B%0A%20%20%20%20%20%20%20%20if%20(evnt.key%20%3D%3D%3D%20%22n%22)%20doTheMagic()%3B%0A%20%20%20%20%7D)%3B%0A%20%20%20%20theMagicIsActive%20%3D%20true%3B%0A%7D%7D)()
If you want to customize it, you can convert it to clean code, edit it and convert it back into a bookmarklet with my bookmarklet editor:
https://www.gibney.org/bookmarklet_editor https://www.gibney.org/bookmarklet_editor