diff --git a/gulp/res/css/style.css b/gulp/res/css/style.css index 8f0ba346..24780d0c 100644 --- a/gulp/res/css/style.css +++ b/gulp/res/css/style.css @@ -46,7 +46,7 @@ body { padding: 10px; } -.pages a, a:visited { +.pages a { text-decoration: none; color: black; } diff --git a/helpers/captchagenerate.js b/helpers/captchagenerate.js index 0fe85136..74f4127b 100644 --- a/helpers/captchagenerate.js +++ b/helpers/captchagenerate.js @@ -29,7 +29,8 @@ module.exports = (text, captchaId) => { x.wave(10, rr(50,80)) .blur(1, 2) .crop(200, 80, 0, 0) - .write(`./uploads/captcha/${captchaId}.png`, (err) => { + .quality(30) + .write(`./uploads/captcha/${captchaId}.jpg`, (err) => { if (err) { return reject(); } diff --git a/helpers/captchaverify.js b/helpers/captchaverify.js index fa9162f4..e976ef1d 100644 --- a/helpers/captchaverify.js +++ b/helpers/captchaverify.js @@ -47,7 +47,7 @@ module.exports = async (req, res, next) => { //it was correct, so delete the file, the cookie and continue res.clearCookie('captchaid'); - await unlink(`${uploadDirectory}captcha/${captchaId}.png`) + await unlink(`${uploadDirectory}captcha/${captchaId}.jpg`) return next(); diff --git a/helpers/files/image-thumbnail.js b/helpers/files/image-thumbnail.js index da70f22f..6b519a9d 100644 --- a/helpers/files/image-thumbnail.js +++ b/helpers/files/image-thumbnail.js @@ -6,14 +6,14 @@ module.exports = (filename) => { return new Promise((resolve, reject) => { gm(`${uploadDirectory}img/${filename}`) - .resize(128, 128) - .noProfile() - .write(`${uploadDirectory}img/thumb-${filename.split('.')[0]}.png`, function (err) { - if (err) { - return reject(err); - } - }); - return resolve(); + .resize(128, 128) +// .quality(30) + .write(`${uploadDirectory}img/thumb-${filename.split('.')[0]}.jpg`, function (err) { + if (err) { + return reject(err); + } + return resolve(); + }); }); }; diff --git a/helpers/files/video-thumbnail.js b/helpers/files/video-thumbnail.js index 6a3e45b2..28d12f84 100644 --- a/helpers/files/video-thumbnail.js +++ b/helpers/files/video-thumbnail.js @@ -12,7 +12,7 @@ module.exports = (filename) => { .screenshots({ timestamps: [0], count: 1, - filename: `thumb-${filename.split('.')[0]}.png`, + filename: `thumb-${filename.split('.')[0]}.jpg`, folder: `${uploadDirectory}img/`, size: '128x?' }); diff --git a/models/pages/captcha.js b/models/pages/captcha.js index 9acf9c94..56ad8d46 100644 --- a/models/pages/captcha.js +++ b/models/pages/captcha.js @@ -6,11 +6,6 @@ const crypto = require('crypto') module.exports = async (req, res, next) => { - //will move captcha cookie check to nginx at some point - if (req.cookies.captchaid) { - return res.redirect(`/captcha/${req.cookies.captchaid}.png`); - } - // if we got here, they dont have a cookie so we need to // gen a captcha, set their cookie and redirect to the captcha const text = crypto.randomBytes(20).toString('hex').substring(0,6); @@ -28,6 +23,6 @@ module.exports = async (req, res, next) => { 'httpOnly': true, 'secure': true }) - .redirect(`/captcha/${captchaId}.png`); + .redirect(`/captcha/${captchaId}.jpg`); } diff --git a/views/mixins/catalogtile.pug b/views/mixins/catalogtile.pug index 22378fa2..fc0ca6b1 100644 --- a/views/mixins/catalogtile.pug +++ b/views/mixins/catalogtile.pug @@ -11,7 +11,7 @@ mixin catalogtile(board, post, truncate) if post.spoiler object(data='/img/spoiler.png' width='64' height='64') else - object.catalog-thumb(data=`/img/thumb-${post.files[0].filename.split('.')[0]}.png` width='64' height='64') + object.catalog-thumb(data=`/img/thumb-${post.files[0].filename.split('.')[0]}.jpg` width='64' height='64') header.post-info span: a(href=postURL) ##{post.postId} | diff --git a/views/mixins/post.pug b/views/mixins/post.pug index 2fedfe2d..73dff1b7 100644 --- a/views/mixins/post.pug +++ b/views/mixins/post.pug @@ -53,7 +53,7 @@ mixin post(post, truncate, manage=false, globalmanage=false) if post.spoiler object(data='/img/spoiler.png' width='128' height='128') else - object(data=`/img/thumb-${file.filename.split('.')[0]}.png`) + object(data=`/img/thumb-${file.filename.split('.')[0]}.jpg`) if post.message if truncate - @@ -69,7 +69,7 @@ mixin post(post, truncate, manage=false, globalmanage=false) else blockquote.post-message !{post.message} if post.banmessage - blockquote.left.clear-both.banmessage (USER WAS BANNED FOR THIS POST #{post.banmessage}) + blockquote.left.clear-both.banmessage USER WAS BANNED FOR THIS POST (#{post.banmessage}) if post.omittedposts || post.omittedimages blockquote.left.clear-both #{post.omittedposts} post(s)#{post.omittedimages > 0 ? ' and '+post.omittedimages+' image(s)' : ''} omitted. #[a(href=postURL) View the full thread]