mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00
19 lines
612 B
JavaScript
19 lines
612 B
JavaScript
![]() |
NEWSBLUR.utils = {
|
||
|
|
||
|
compute_story_score: function(story) {
|
||
|
var score = 0;
|
||
|
var score_max = Math.max(story.intelligence['title'],
|
||
|
story.intelligence['author'],
|
||
|
story.intelligence['tags']);
|
||
|
var score_min = Math.min(story.intelligence['title'],
|
||
|
story.intelligence['author'],
|
||
|
story.intelligence['tags']);
|
||
|
if (score_max > 0) score = score_max;
|
||
|
else if (score_min < 0) score = score_min;
|
||
|
|
||
|
if (score == 0) score = story.intelligence['feed'];
|
||
|
|
||
|
return score;
|
||
|
}
|
||
|
|
||
|
};
|