Compare commits
2 Commits
4ed28e7e6d
...
baebe7d5aa
Author | SHA1 | Date | |
---|---|---|---|
baebe7d5aa | |||
9b9d25504e |
9
lib.js
9
lib.js
@ -210,7 +210,7 @@ export const createPosts = async (channel, source, fromDate, reducerCallback) =>
|
|||||||
|
|
||||||
export const createPost = (item, source) => {
|
export const createPost = (item, source) => {
|
||||||
let description = item.querySelector('description')
|
let description = item.querySelector('description')
|
||||||
description = description === null ? '' : new JSDOM(description.textContent).window.document
|
description = new JSDOM(description === null ? '' : description.textContent).window.document
|
||||||
|
|
||||||
let date = readPubDate(item.querySelector('pubDate'))
|
let date = readPubDate(item.querySelector('pubDate'))
|
||||||
let link = item.querySelector('link')?.textContent
|
let link = item.querySelector('link')?.textContent
|
||||||
@ -424,12 +424,14 @@ export const imageExtensions = {
|
|||||||
'image/avif': '.avif',
|
'image/avif': '.avif',
|
||||||
'image/bmp': '.bmp',
|
'image/bmp': '.bmp',
|
||||||
'image/gif': '.gif',
|
'image/gif': '.gif',
|
||||||
|
'image/gifv': '.gifv',
|
||||||
'image/vnd.microsoft.icon': '.icon',
|
'image/vnd.microsoft.icon': '.icon',
|
||||||
'image/jpeg': '.jpg',
|
'image/jpeg': '.jpg',
|
||||||
'image/png': '.png',
|
'image/png': '.png',
|
||||||
'image/svg+xml': '.xml',
|
'image/svg+xml': '.xml',
|
||||||
'image/tiff': '.tif',
|
'image/tiff': '.tif',
|
||||||
'image/webp': '.webp'
|
'image/webp': '.webp',
|
||||||
|
'image/webm': '.gifv'
|
||||||
}
|
}
|
||||||
|
|
||||||
export const pullImages = async (post, view, discardPostIfNoImages = false, getPostId = getPostIdFromPathname) => {
|
export const pullImages = async (post, view, discardPostIfNoImages = false, getPostId = getPostIdFromPathname) => {
|
||||||
@ -550,6 +552,7 @@ export const writeView = (sources, feeds, view) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(let page of pages) {
|
for(let page of pages) {
|
||||||
|
console.log('Writing page', page)
|
||||||
writePage(page, view)
|
writePage(page, view)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -596,6 +599,8 @@ export const createPages = (list, view) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(list)
|
||||||
|
|
||||||
return pages
|
return pages
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ tumblr.createSource = (user, options, postReducerCallback, cache) => {
|
|||||||
tumblr.isRepost = (post) => {
|
tumblr.isRepost = (post) => {
|
||||||
let reblog = post.description.querySelector('p > a.tumblr_blog')
|
let reblog = post.description.querySelector('p > a.tumblr_blog')
|
||||||
|
|
||||||
return reblog && reblog.innerHTML !== post.source.user
|
return reblog ? reblog.innerHTML !== post.source.user : false
|
||||||
}
|
}
|
||||||
|
|
||||||
tumblr.matchesTags = (post, whitelist, blacklist) => {
|
tumblr.matchesTags = (post, whitelist, blacklist) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user