Thứ Bảy, 18 tháng 6, 2022

Show HN: Unclutter — A new approach to reader mode https://ift.tt/7FaUHhw

Show HN: Unclutter — A new approach to reader mode Hey! This is a reader mode browser extension I built that hides noisy page elements rather than extracting and re-rendering only the page text. 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, detecting the likely main text & removing its non-text siblings, blocklists for classnames that contain words like "sidebar", and testing this on a few hundred popular sites. I got carried away and also added a dark mode, page outlines, private annotations & 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 related article HTML. So when you click a link on HN you’ll see the parts people are talking about while reading. [1] The code is all on GitHub! [0] Screenshots comparing it to the Firefox reader mode: https://ift.tt/yX2bJUM... [1] It's fun to try this on some of the "HN classics" that got 30+ quote comments over the years. Another project I built, https://ift.tt/GAWBE5O shows the number of "annotations" an article has beneath its title. https://ift.tt/DwPxVAp June 18, 2022 at 05:19AM

Không có nhận xét nào:

Đăng nhận xét