+5
-1
src/app/api/series/[seriesId]/route.js
+5
-1
src/app/api/series/[seriesId]/route.js
···
+6
-1
src/app/api/works/[workId]/chapters/[chapterId]/route.js
+6
-1
src/app/api/works/[workId]/chapters/[chapterId]/route.js
···
+6
-3
src/app/api/works/[workId]/route.js
+6
-3
src/app/api/works/[workId]/route.js
···+import { setArchiveBaseUrl, getArchiveBaseUrl, resetArchiveBaseUrl } from "@fujocoded/ao3.js/urls"
+25
-3
src/app/generator/page.js
+25
-3
src/app/generator/page.js
·········+const domainParam = domain && !(["ao3.org", "archiveofourown.org", "archive.transformativeworks.org"].includes(domain)) ? `?archive=${domain}` : ''-const resp = match.groups.chapterId ? await fetch(`/api/works/${match.groups.workId}/chapters/${match.groups.chapterId}`) : await fetch(`/api/works/${match.groups.workId}`)+const resp = match.groups.chapterId ? await fetch(`/api/works/${match.groups.workId}/chapters/${match.groups.chapterId}${domainParam}`) : await fetch(`/api/works/${match.groups.workId}${domainParam}`)setAddr(match.groups.chapterId ? `works/${match.groups.workId}/chapters/${match.groups.chapterId}` : `works/${match.groups.workId}`)···
+13
src/app/locked/route.js
+13
src/app/locked/route.js
···+return OGImageLocked({theme: props.has('theme') ? props.get('theme') : process.env.DEFAULT_THEME})
+4
-1
src/app/series/[seriesId]/preview/route.js
+4
-1
src/app/series/[seriesId]/preview/route.js
······
+6
-6
src/app/works/[workId]/chapters/[chapterId]/preview/route.js
+6
-6
src/app/works/[workId]/chapters/[chapterId]/preview/route.js
······+const addr = `${props.has('archive') ? props.get('archive').replace("https://", "")+"/" : 'archiveofourown.org/'}works/${workId}/chapters/${chapterId}`
+6
-13
src/app/works/[workId]/preview/route.js
+6
-13
src/app/works/[workId]/preview/route.js
······+const addr = `${props.has('archive') ? props.get('archive').replace("https://", "")+"/" : 'archiveofourown.org/'}works/${workId}`
+19
-14
src/lib/ogimage.js
+19
-14
src/lib/ogimage.js
···{image.props.rating && image.rating === 'E' && (<Explicit fg={theme.accentColor} bg={theme.accent} width={28} height={28} />)}{image.props.rating && image.rating === 'M' && (<Mature fg={theme.accentColor} bg={theme.accent} width={28} height={28} />)}{image.props.rating && image.rating === 'T' && (<Teen fg={theme.accentColor} bg={theme.accent} width={28} height={28} />)}···-{image.props.wordcount && `${image.words} words • `}{(image.props.chapters && image.chapterCount !== null) && `${image.chapterCount} chapters • `}{image.props.postedAt && `posted on ${image.postedAt} • `}{image.props.updatedAt && `updated on ${image.updatedAt} • `}{process.env.ARCHIVE}/{addr}+{image.props.wordcount && `${image.words} words • `}{(image.props.chapters && image.chapterCount !== null) && `${image.chapterCount} chapters • `}{image.props.postedAt && `posted on ${image.postedAt} • `}{image.props.updatedAt && `updated on ${image.updatedAt} • `}{addr}
+7
-7
src/lib/ogimagelocked.js
+7
-7
src/lib/ogimagelocked.js
······
+16
-12
src/lib/sanitizeData.js
+16
-12
src/lib/sanitizeData.js
······const warningsUnique = warnings.reduce((a, b) => { return a.concat(b) }).filter((w, i) => { return i === warnings.indexOf(w) })if (warningsUnique.length === 1 && warningsUnique[0] === "Creator Chose Not To Use Archive Warnings") {······const titleFont = propsParsed.titleFont ? propsParsed.titleFont : process.env.DEFAULT_TITLE_FONT···-const rating = type === 'work' ? await getHighestRating([data]) : await getHighestRating(data.works)-const warning = type === 'work' ? await getHighestWarning([data]) : await getHighestWarning(data.works)+const rating = type === 'work' ? await getHighestRating([data], archive) : await getHighestRating(data.works, archive)+const warning = type === 'work' ? await getHighestWarning([data], archive) : await getHighestWarning(data.works, archive)+const category = type === 'work' ? await getCategory([data], archive) : await getCategory(data.works, archive)