redirecter for ao3 that adds opengraph metadata

remove a bunch of console logs

Changed files
-9
src
app
generator
works
[workId]
chapters
[chapterId]
lib
-3
next.config.mjs
··· 1 /** @type {import('next').NextConfig} */ 2 const nextConfig = { 3 /* config options here */ 4 - turbopack: { 5 - root: '/var/www/fixao3' 6 - } 7 }; 8 9 export default nextConfig;
··· 1 /** @type {import('next').NextConfig} */ 2 const nextConfig = { 3 /* config options here */ 4 }; 5 6 export default nextConfig;
-2
src/app/generator/page.js
··· 62 const imageBlob = await image.blob() 63 const reader = new FileReader() 64 reader.onloadend = () => { 65 - console.log(reader.result) 66 setImgData(reader.result) 67 } 68 return ··· 74 const reader = new FileReader() 75 reader.onloadend = () => { 76 setImgData(reader.result) 77 - console.log(imgData) 78 } 79 reader.readAsDataURL(imageBlob) 80 }
··· 62 const imageBlob = await image.blob() 63 const reader = new FileReader() 64 reader.onloadend = () => { 65 setImgData(reader.result) 66 } 67 return ··· 73 const reader = new FileReader() 74 reader.onloadend = () => { 75 setImgData(reader.result) 76 } 77 reader.readAsDataURL(imageBlob) 78 }
-1
src/app/works/[workId]/chapters/[chapterId]/page.js
··· 27 const title = `${work.title} by ${authorString}, Chapter ${work.chapterInfo.index}${work.chapterInfo.name ? ": "+work.chapterInfo.name : ''} - ${fandomString}` 28 const summary = work.chapterInfo && work.chapterInfo.summary ? work.chapterInfo.summary : parentWork.summary 29 const summaryDOM = new DOM(summary, {decodeEntities: true}); 30 - console.log(summary) 31 const description = summaryDOM.innerHTML.replace(/\<br(?: \/)?\>/g, "\n").replace( 32 /(<([^>]+)>)/ig, 33 "",
··· 27 const title = `${work.title} by ${authorString}, Chapter ${work.chapterInfo.index}${work.chapterInfo.name ? ": "+work.chapterInfo.name : ''} - ${fandomString}` 28 const summary = work.chapterInfo && work.chapterInfo.summary ? work.chapterInfo.summary : parentWork.summary 29 const summaryDOM = new DOM(summary, {decodeEntities: true}); 30 const description = summaryDOM.innerHTML.replace(/\<br(?: \/)?\>/g, "\n").replace( 31 /(<([^>]+)>)/ig, 32 "",
-3
src/lib/sanitizeData.js
··· 14 } 15 16 const getHighestRating = async (works, archive = null) => { 17 - console.log('get rating') 18 const ratings = await Promise.all(works.map(async (w) => { 19 const work = await getWork(w.id, archive) 20 return work.rating ··· 32 } 33 34 const getHighestWarning = async (works, archive = null) => { 35 - console.log('get warning') 36 const warnings = await Promise.all(works.map(async (w) => { 37 const work = await getWork(w.id) 38 return work.tags.warnings ··· 47 } 48 49 const getCategory = async (works, archive = null) => { 50 - console.log('get category') 51 const categories = await Promise.all(works.map(async (w) => { 52 const work = await getWork(w.id) 53 return work.category
··· 14 } 15 16 const getHighestRating = async (works, archive = null) => { 17 const ratings = await Promise.all(works.map(async (w) => { 18 const work = await getWork(w.id, archive) 19 return work.rating ··· 31 } 32 33 const getHighestWarning = async (works, archive = null) => { 34 const warnings = await Promise.all(works.map(async (w) => { 35 const work = await getWork(w.id) 36 return work.tags.warnings ··· 45 } 46 47 const getCategory = async (works, archive = null) => { 48 const categories = await Promise.all(works.map(async (w) => { 49 const work = await getWork(w.id) 50 return work.category