mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 19:47:00 +03:00
Merge pull request #51 from ajayyy/experimental
Prevented overdownvoting
This commit is contained in:
2
index.js
2
index.js
@@ -344,7 +344,7 @@ app.get('/api/voteOnSponsorTime', function (req, res) {
|
|||||||
type = incrementAmount;
|
type = incrementAmount;
|
||||||
} else if (row != null && (row.votes > 8 || row.views > 15) && incrementAmount < 0) {
|
} else if (row != null && (row.votes > 8 || row.views > 15) && incrementAmount < 0) {
|
||||||
//increase the power of this downvote
|
//increase the power of this downvote
|
||||||
incrementAmount = -10;
|
incrementAmount = -Math.abs(Math.min(10, row.votes + 2 - oldIncrementAmount));
|
||||||
type = incrementAmount;
|
type = incrementAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user