@@ -16,28 +16,28 @@ let MIN_POSTS_TO_UPVOTE = 20,
1616 MAX_POST_AGE_DAYS = 0 ; // 0 means disabled
1717
1818let Config = {
19- minPostToDownvote : function ( ) {
19+ minPostToDownvote ( ) {
2020 return MIN_POSTS_TO_DOWNVOTE ;
2121 } ,
22- minDaysToDownvote : function ( ) {
22+ minDaysToDownvote ( ) {
2323 return MIN_DAYS_TO_DOWNVOTE ;
2424 } ,
25- minReputationToDownvote : function ( ) {
25+ minReputationToDownvote ( ) {
2626 return MIN_REPUTATION_TO_DOWNVOTE ;
2727 } ,
28- minPostToUpvote : function ( ) {
28+ minPostToUpvote ( ) {
2929 return MIN_POSTS_TO_UPVOTE ;
3030 } ,
31- minDaysToUpvote : function ( ) {
31+ minDaysToUpvote ( ) {
3232 return MIN_DAYS_TO_UPVOTE ;
3333 } ,
34- maxVotesPerUserInThread : function ( ) {
34+ maxVotesPerUserInThread ( ) {
3535 return MAX_VOTES_PER_USER_AND_THREAD ;
3636 } ,
37- maxVotesToSameUserInMonth : function ( ) {
37+ maxVotesToSameUserInMonth ( ) {
3838 return MAX_VOTES_TO_SAME_USER_PER_MONTH ;
3939 } ,
40- maxVotesPerUser : function ( reputation ) {
40+ maxVotesPerUser ( reputation ) {
4141 let MIN = 5 ,
4242 MAX = 50 ;
4343 let calculatedVotesPerUser = Math . floor ( reputation / 10 ) ;
@@ -48,56 +48,56 @@ let Config = {
4848 }
4949 return calculatedVotesPerUser ;
5050 } ,
51- maxDownvotesPerDay : function ( ) {
51+ maxDownvotesPerDay ( ) {
5252 return MAX_DOWNVOTES_PER_DAY ;
5353 } ,
54- upvoteExtraPercentage : function ( ) {
54+ upvoteExtraPercentage ( ) {
5555 return UPVOTE_EXTRA_PERCENTAGE ;
5656 } ,
57- downvoteExtraPercentage : function ( ) {
57+ downvoteExtraPercentage ( ) {
5858 return DOWNVOTE_EXTRA_PERCENTAGE ;
5959 } ,
60- downvotePenalization : function ( ) {
60+ downvotePenalization ( ) {
6161 return DOWNVOTE_PENALIZATION ;
6262 } ,
63- maxUpvoteWeight : function ( ) {
63+ maxUpvoteWeight ( ) {
6464 return MAX_POINTS_FOR_UPVOTE ;
6565 } ,
66- maxDownvoteWeight : function ( ) {
66+ maxDownvoteWeight ( ) {
6767 return MAX_POINTS_FOR_DOWNVOTE ;
6868 } ,
69- getMainLogId : function ( voterId , authorId , topicId , postId ) {
69+ getMainLogId ( voterId , authorId , topicId , postId ) {
7070 return REP_LOG_NAMESPACE + ":"
7171 + voterId + ":"
7272 + authorId + ":"
7373 + topicId + ":"
7474 + postId ;
7575 } ,
76- getPerThreadLogId : function ( voterId , topicId ) {
76+ getPerThreadLogId ( voterId , topicId ) {
7777 return REP_LOG_NAMESPACE + ":user:" + voterId + ":thread:" + topicId ;
7878 } ,
79- getPerAuthorLogId : function ( voterId , authorId ) {
79+ getPerAuthorLogId ( voterId , authorId ) {
8080 let now = new Date ( ) ;
8181 let month = ( now . getMonth ( ) + 1 ) + "-" + now . getFullYear ( ) ;
8282 return REP_LOG_NAMESPACE + ":user:" + voterId + ":author:" + authorId + ":month:" + month ;
8383 } ,
84- getPerUserLogId : function ( voterId ) {
84+ getPerUserLogId ( voterId ) {
8585 let now = new Date ( ) ;
8686 let today = now . getDate ( ) + "-" + ( now . getMonth ( ) + 1 ) + "-" + now . getFullYear ( ) ;
8787 return REP_LOG_NAMESPACE + ":user:" + voterId + ":day:" + today ;
8888 } ,
89- getPerUserAndTypeLogId : function ( voterId , voteType ) {
89+ getPerUserAndTypeLogId ( voterId , voteType ) {
9090 let now = new Date ( ) ;
9191 let today = now . getDate ( ) + "-" + ( now . getMonth ( ) + 1 ) + "-" + now . getFullYear ( ) ;
9292 return REP_LOG_NAMESPACE + ":user:" + voterId + ":day:" + today + ':type:' + voteType ;
9393 } ,
94- getDisabledCategories : function ( ) {
94+ getDisabledCategories ( ) {
9595 return DISABLED_CATEGORIES_IDS ;
9696 } ,
97- getMaxPostAgeDays : function ( ) {
97+ getMaxPostAgeDays ( ) {
9898 return MAX_POST_AGE_DAYS ;
9999 } ,
100- getSettings : function ( ) {
100+ getSettings ( ) {
101101 let settings = { } ;
102102 settings . minPostsToUpvote = MIN_POSTS_TO_UPVOTE ;
103103 settings . minDaysToUpvote = MIN_DAYS_TO_UPVOTE ;
@@ -117,7 +117,7 @@ let Config = {
117117 settings . maxPostAgeDays = MAX_POST_AGE_DAYS ;
118118 return settings ;
119119 } ,
120- setSettings : function ( settings ) {
120+ setSettings ( settings ) {
121121 MIN_POSTS_TO_UPVOTE = settings . minPostsToUpvote ;
122122 MIN_DAYS_TO_UPVOTE = settings . minDaysToUpvote ;
123123 MIN_POSTS_TO_DOWNVOTE = settings . minPostsToDownvote ;
0 commit comments