User:Phlsph7/Readability.js: Difference between revisions

Content deleted Content added
optimize
optimize
Line 123:
if(!isNaN(score)){
sentenceElement.title = `Score: ${score.toFixed(2)}`;
sentenceElement.dataset.sentenceText = sentenceText;
sentenceElement.dataset.score = score;
sentenceElement.classList.add(getScoreClass(score, scoreClasses));
}
Line 286 ⟶ 288:
const sentenceMatrix = [];
for(let sentenceElement of sentenceElements){
let sentenceText = getSentenceText(sentenceElement).dataset.sentenceText;
let score = getSentenceScoreparseFloat(sentenceTextsentenceElement.dataset.score);
sentenceMatrix.push([sentenceText, score]);
}