Dan Burzo
1a61a23f68
Readability on npm ( #608 )
...
* Initial work on preparing Readability for npm
* Adjust some require()s
* Point package.json to index.js
* Add Node.js instructions to README
* Use ES6 in eslint
4 years ago
Dan Burzo
b1d15c0ef9
Add option.serializer, fixes #605 ( #607 )
4 years ago
Gijs Kruitbosch
b2f3a43f9f
Detect 'trailing' content when comparing DOMs
4 years ago
Jordy van den Aardweg
2982216913
Added "keepClasses" option to prevent cleaning of classes ( #552 )
5 years ago
Gijs Kruitbosch
512e1c18a7
Update to latest JSDOM
6 years ago
Gijs Kruitbosch
2620542dd1
Split off isProbablyReaderable implementation
6 years ago
Maria Luiza Soares
8c41d92560
Assert on siteName in all test cases
6 years ago
Gijs Kruitbosch
30611cc57f
Fix quotes issues in test and benchmark files
6 years ago
Gijs Kruitbosch
f4ab856992
Check for a document being passed
...
This provides a descriptive error message if no document is passed, and
ignores the first argument if the second argument looks like
a reasonable DOM document instance.
6 years ago
David A Roberts
d60184966c
Remove unused URI parameter from constructor
6 years ago
Gijs Kruitbosch
d598baf02b
Improve URL handling in JSDOMParser and Readability.js
...
This change ups the required node version to 7.0 because it relies on the builtin url module.
We now pass a url when constructing a jsdom document or JSDOMParser document.
Because this is an API change, I'm increasing the package version.
Ultimately, I would like to remove the argument from the readability constructor. It should
use the documentURI from the document it is passed.
6 years ago
Cameron McCormack
d88c9afc63
Use a hard coded classesToPreserve in tests.
7 years ago
Björgvin Ragnarsson
c3ff1a2d2c
remove dead code
7 years ago
Gijs Kruitbosch
6f0bd81dfa
Provide more useful output when attributes mismatch, r=me,test-only
7 years ago
Gijs Kruitbosch
66c013c4fb
Make it easier to find where errors are coming from based on the error message
7 years ago
Gijs Kruitbosch
0ab4ac8556
Fix test failures caused by timeout still being too low
8 years ago
Evan Tseng
e84c0c3f07
Bug 1285543 - Only use "og:title" or "twitter:title" if _getArticleTitle does not return a valid title, r=Gijs
8 years ago
Evan Tseng
af0aa5c59f
Bug 1173548 - Find out text direction from ancestors of final candidate, r=Gijs
8 years ago
Evan Tseng
4fa0d1b207
Bug 1177619 - Score div nodes which have br nodes. r=Gijs
8 years ago
Gijs
1a12befa41
Fix code style, tighten up eslint rules ( #301 )
8 years ago
Gijs Kruitbosch
a4d1e9ca12
Fix oversight in comment removal code exposed by better/newer jsdom implementation
8 years ago
Gijs Kruitbosch
dffa760c04
Fix issue #267 by ignoring hash URIs when making URIs absolute
8 years ago
Gijs Kruitbosch
2e1cb3f467
Fix issue #251 by making JSDOMParser expect XML and stop making excuses for 'self-closed' things, when all that does is cause trouble
8 years ago
Nicolas Perriault
9dbc009376
Fixes #113 - Recursive node ancestor scoring.
9 years ago
Nicolas Perriault
de89036cd5
Fixes #130 - Using js-beautify for HTML formatting.
9 years ago
Nicolas Perriault
12c6a11f67
Fixes #163 - Avoid including footer tag contents.
9 years ago
Nicolas Perriault
4424b0bad7
Refs #128 - Add support for options to Readability constructor. r=@gijsk
9 years ago
Gijs Kruitbosch
c53ca31907
Fixed test result output being sent at once
9 years ago
Gijs Kruitbosch
225adef137
Turn off JS when using JSDOM in tests.
9 years ago
Gijs Kruitbosch
b1f6c62b25
Fix tests for readability to also work with jsdom
...
For instance, jsdom's more spec-compliant parsing causes issues with auto-closing elements (lifehacker article) and with not having self-closing <img> and <br> tags. The former was fixed by removing offending markup, the latter by adjusting JSDOMParser to be more sane, and the expected outputs to cope with this.
Finally, JSDOMParser automatically drops comments. The test code needed to manually do this in the jsdom case.
9 years ago
Nicolas Perriault
3b636b59f0
Added readerable value to test pages metadata.
9 years ago
Margaret Leibovic
6b7834f798
add test for isProbablyReaderable
9 years ago
Nicolas Perriault
1e14d47bb7
Added benchmarks.
9 years ago
Gijs
14b33b69db
Merge pull request #65 from mozilla/support-embed-videos
...
Fixes #56 - Updated support for embedded Youtube & Vimeo videos.
9 years ago
Nicolas Perriault
ad52d8ee30
Fixes #53 - Fixed dot-slash relative URI resolution.
9 years ago
Nicolas Perriault
2d5f59f3eb
Fixes #56 - Updated support for embedded Youtube & Vimeo videos.
9 years ago
Nicolas Perriault
cf3dce6cf2
Refs #58 - Stripped embed tags.
9 years ago
Gijs Kruitbosch
f9e770ad3b
Write a bunch of tests for jsdomparser
9 years ago