mirror of
https://codeberg.org/teddit/teddit.git
synced 2026-04-17 21:34:44 -04:00
fix gallery urls #95
This commit is contained in:
@@ -41,6 +41,8 @@ module.exports = function(request, fs) {
|
||||
let u = new URL(url)
|
||||
if(u.host === 'www.reddit.com' || u.host === 'reddit.com') {
|
||||
url = url.replace(u.host, config.domain)
|
||||
if(u.pathname.startsWith('/gallery/'))
|
||||
url = url.replace('/gallery/', '/comments/')
|
||||
}
|
||||
if(u.host === 'i.redd.it' || u.host === 'v.redd.it') {
|
||||
let image_exts = ['png', 'jpg', 'jpeg']
|
||||
|
||||
Reference in New Issue
Block a user