use default threshold for share elements

pull/535/head
PalmerAL 5 years ago committed by Gijs
parent b9cece3e58
commit 681bf0c47b

@ -579,9 +579,12 @@ Readability.prototype = {
// Clean out elements with little content that have "share" in their id/class combinations from final top candidates,
// which means we don't remove the top candidates even they have "share".
var shareElementThreshold = this.DEFAULT_CHAR_THRESHOLD
this._forEachNode(articleContent.children, function (topCandidate) {
this._cleanMatchedNodes(topCandidate, function (node, matchString) {
return /share/.test(matchString) && node.textContent.length < 500;
return /share/.test(matchString) && node.textContent.length < shareElementThreshold;
});
});

Loading…
Cancel
Save