Skip to content

Commit 3534e8c

Browse files
committed
Added text to ratings
1 parent 9dea8b9 commit 3534e8c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

public/js/script.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,15 @@ $(document).ready(function(){
1616
console.log(msg.responseText);
1717
var score = msg.responseText;
1818
score = (Math.round(parseFloat(score)*10))/10;
19-
$("div.result").append('<span><h1>'+score+'</h1></span>');
19+
if(score > 8)
20+
rating = "Extremely positive";
21+
else if(score > 6)
22+
rating = "Fairly positive";
23+
else if(score > 4)
24+
rating = "Mixed";
25+
else
26+
rating = "Negative";
27+
$("div.result").append('<span><h1>'+rating+':'+score+'</h1></span>');
2028
$("#ajax-loader").remove();
2129
}
2230
})

0 commit comments

Comments
 (0)