Closed n1k0 closed 9 years ago
It seems the issue is not with the readability.js implementation, but rather with the reader mode detection. I don't know where this code leaves though, and any pointers would be appreciated (because obviously, this is behaving in a wrong way).
This sounds similar to this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1154295
Yeah... not sure what to do about this. :-\
We can detect if it is a .txt document pretty easily. We will need the parser though to break up the blocks of text and create paragraphs out of them. Could we just look for consecutive line-breaks (more than 1)?
In privileged JS, you can check to see if document.mozSyntheticDocument is true. If so, then check that the body only has one child (pre) and that the pre has no children.
I don't think we should care about the length of these documents. Checking pre.textContent.length is gonna be a very long string for most .txt documents.
This isn't a .txt document though...
Fixed by #188.
http://tools.ietf.org/html/draft-dejong-remotestorage-04