Login

Search Javascript Folder

/ root / Products / Root / AllJavascript / NotUsed

Not Used
  

ViewCount

1    function getViewCount(aNode){
2       if (isMobile){
3           return aNode.data.viewCount;
4       }
5       return aNode.viewCount;
6   }
7   
8   function score (aNode){
9         var upVotes, downVotes, viewCount, ratio;
10         upVotes=Number(getUpVotes(aNode));
11         downVotes= Number(getDownVotes(aNode));
12         viewCount=Number(getViewCount(aNode));
13         ratio = (upVotes - (5 * downVotes))/viewCount;
14         ratio = ratio * 10000;
15         return ratio;
16   }