4 ms·
How does a browser's reader mode carve out the bit you want to read and ignore menus and other cruft? Does it scan for semantic elements like `<main> / <article
by sysadm1n 5y ago
How does a browser's reader mode carve out the bit you want to read and ignore menus and other cruft? Does it scan for semantic elements like `<main> / <article>` or something and then serve up the 'meat' of the article?
- js2 5y agoMore or less. Here's various implementations: https://github.com/masukomi/arc90-readability https://github.com/masukomi/arc90-readability Original JS library: https://github.com/masukomi/arc90-readability/blob/master/js/readability.js https://github.com/masukomi/arc90-readability/blob/master/js... Specifically see here: https://github.com/masukomi/arc90-readability/blob/master/js/readability.js#L704 https://github.com/masukomi/arc90-readability/blob/master/js...