dumbass speedrun any%

master
Drake 1 year ago
parent 287a8ca82f
commit 4dc6e74659

@ -47,7 +47,7 @@ export default (props: PropsWithChildren<StoryProps>) => {
const currentURL = new URL( const currentURL = new URL(
"https://voltpad.ruthenic.com" + props.currentHref "https://voltpad.ruthenic.com" + props.currentHref
); );
const chapterNum = currentURL.searchParams.get("chapter") ?? 0; const chapterNum = Number(currentURL.searchParams.get("chapter") ?? 0);
return ( return (
<html lang="en"> <html lang="en">
@ -103,7 +103,7 @@ export default (props: PropsWithChildren<StoryProps>) => {
{isChapter ? ( {isChapter ? (
<meta <meta
property="og:title" property="og:title"
content={props.story.chapters[0].name} content={props.story.chapters[chapterNum].name}
/> />
) : ( ) : (
<meta property="og:title" content={props.story.name} /> <meta property="og:title" content={props.story.name} />
@ -113,7 +113,10 @@ export default (props: PropsWithChildren<StoryProps>) => {
props.story.chapters[0].partJSON.photoUrl ? ( props.story.chapters[0].partJSON.photoUrl ? (
<meta <meta
property="og:image" property="og:image"
content={props.story.chapters[0].partJSON.photoUrl} content={
props.story.chapters[chapterNum].partJSON
.photoUrl
}
/> />
) : undefined ) : undefined
) : undefined} ) : undefined}
@ -122,7 +125,7 @@ export default (props: PropsWithChildren<StoryProps>) => {
props.story.chapters[0].partJSON.videoId ? ( props.story.chapters[0].partJSON.videoId ? (
<meta <meta
property="og:video" property="og:video"
content={`https://www.youtube.com/v/${props.story.chapters[0].partJSON.videoId}`} content={`https://www.youtube.com/v/${props.story.chapters[chapterNum].partJSON.videoId}`}
/> />
) : undefined ) : undefined
) : undefined} ) : undefined}

Loading…
Cancel
Save