Wikipedia

Search results

Saturday, June 4, 2022

Show HN: Reader mode extension with inline Hacker News comments https://ift.tt/6YHEDAn

Show HN: Reader mode extension with inline Hacker News comments Hey! This is a reader mode browser extension I built that hides noisy page elements rather than extracting and re-rendering their text content. The idea is to not make all articles look the same [0], have them still render graphs, and ideally to work in more cases. There are a few "tricks": patching the site CSSOM to apply simpler mobile styles even at desktop width, cleaning up parents of DOM text nodes, blocklists for class names that contain words like "sidebar", plus manual CSS patches for popular sites. I got carried away and also added a dark mode, page outlines, privates notes & inline Hacker News comments. The last feature works by parsing every top-level HN comment with a quote in it (formatted with > or "") within a few minutes, and anchoring these quotes in the story article HTML. So when you open a link you'll directly see the parts people are talking about here. [1] The extension code is all on GitHub: https://ift.tt/xwMtY9n --- [0] Unclutter vs the Firefox reader mode: https://ift.tt/KZf5Dvp... [1] It's fun to try this on some of the "HN classics" that got 30+ quote comments over the years. The list at https://ift.tt/pgUPkV8 shows the number of "annotations" a link has beneath its title. https://ift.tt/hxNfOZp June 4, 2022 at 03:06PM

No comments:

Post a Comment