make the preference show_upvoted_percentage configurable via config.js #274

This commit is contained in:
teddit
2021-12-21 22:19:38 +01:00
parent 4bf092e481
commit 8315ad3f16
2 changed files with 5 additions and 0 deletions

View File

@@ -68,6 +68,10 @@ overridingRoutes.all('*', (req, res, next) => {
maxAge: 31536000,
httpOnly: true,
});
} else if (!req.cookies.show_upvoted_percentage) {
if (config.show_upvoted_percentage) {
req.cookies.show_upvoted_percentage = 'true';
}
}
let domainTwitter = req.query.domain_twitter;