fix upvote ratio percentage rounding #181

This commit is contained in:
teddit 2021-04-02 21:12:04 +02:00
parent dab4e8a8fe
commit b69c953148
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ html
span #{kFormatter(post.ups)}
if user_preferences.show_upvoted_percentage === 'true'
- let downvoted = parseInt(post.ups * (1 - post.upvote_ratio))
span.ratio(title="~"+ downvoted +" downvoted") #{post.upvote_ratio * 100}%
span.ratio(title="~"+ downvoted +" downvoted") #{(post.upvote_ratio * 100).toFixed(0)}%
div.arrow.down
.title
a(href="" + post.url + "", rel="noopener noreferrer")