summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/readability.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/readability.js b/js/readability.js
index ef8b0e4..934ffb8 100755
--- a/js/readability.js
+++ b/js/readability.js
@@ -59,13 +59,13 @@ function grabArticle() {
// Look for a special classname
if(parentNode.className.match(/(comment|meta|footer|footnote)/))
parentNode.readability.contentScore -= 50;
- else if(parentNode.className.match(/((^|\\s)(post|hentry|entry[-]?(content|text|body)|article[-]?(content|text|body))(\\s|$))/))
+ else if(parentNode.className.match(/((^|\\s)(post|hentry|entry[-]?(content|text|body)?|article[-]?(content|text|body)?)(\\s|$))/))
parentNode.readability.contentScore += 25;
// Look for a special ID
if(parentNode.id.match(/(comment|meta|footer|footnote)/))
parentNode.readability.contentScore -= 50;
- else if(parentNode.id.match(/((^|\\s)(post|hentry|entry[-]?(content|text|body)|article[-]?(content|text|body))(\\s|$))/))
+ else if(parentNode.id.match(/^(post|hentry|entry[-]?(content|text|body)?|article[-]?(content|text|body)?)$/))
parentNode.readability.contentScore += 25;
}