Safari has a "Reader Mode" which removes everything from a website with an article but the text. Does anyone know of an open source library which provides the same functionality? Or, do you think it would be difficult to implement?
-
I found this source code: [PHP - how to get main HTML content like Reader Mode in Firefox][1] [1]: http://stackoverflow.com/questions/17733275/php-how-to-get-main-html-content-like-reader-mode-in-firefox/17735301#17735301 – Milad Ghiravani Jul 18 '13 at 22:51
4 Answers
Safari's reader mode is based upon Arc90's Readability(the original, not current, one), which is Apache-licensed. Here's a PHP port of it. Some more searching will probably turn up various other languages. (You didn't really specify where you were asking about implementing.)

- 2,128
- 20
- 22
-
2Firefox (which is open source) for Android now has the "Reader mode" implemented: http://mzl.la/VDEIFA You will probably have to dig in through their code to see where it is located. And if you do find it, kindly link it back here. Thanks. – pm_labs Feb 24 '13 at 03:52
I'm aware of the licencing issue about my post might raise here, but it's Apple and their policies are philosophically contestable. So, for the common good & research :
Safari JS reader source: https://github.com/amumu/safari-reader-js
How to get the latest version from Safari is explained in the README.
If you really want an open source Version, user the other posts, they're all good.
Cheers.

- 2,803
- 3
- 27
- 43

- 2,546
- 31
- 50
-
that URL does not work anymore -- "Repository unavailable due to DMCA takedown." Fortunately, googling for "safari-reader-js" does yield a few results... – Greg Sadetsky Jul 08 '18 at 22:15
-
5I know. Can't do much about it... exept: http://blog.manbolo.com/2013/03/18/safari-reader-source-code or https://github.com/amumu/safari-reader-js – Romain Bruckert Jul 12 '18 at 12:57
-
those are great! could you edit your answer and add those links? – Greg Sadetsky Jul 12 '18 at 16:27
-
Mozilla open-sourced their version they use in Firefox https://github.com/mozilla/readability – Amit Apr 30 '22 at 19:09
Here is a fairly popular JavaScript version based on arc90's readability project as well.

- 10,351
- 10
- 67
- 79
Firefox for Android contains a file called Readability.js which says:
- This code is heavily based on Arc90's readability.js (1.7.1) script
- available at: http://code.google.com/p/arc90labs-readability

- 59
- 3