mirror of
https://codeberg.org/tacerus/teddit.git
synced 2024-11-22 23:09:28 +01:00
fix gallery urls #95
This commit is contained in:
parent
a13b7d9ed7
commit
d3444d1f4a
@ -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']
|
||||
|
Loading…
Reference in New Issue
Block a user