make videoscroll URLs relative

master
Tomáš Mládek 2021-01-10 12:48:51 +01:00
parent 982f1ef026
commit 847f40961a
1 changed files with 2 additions and 1 deletions

View File

@ -151,7 +151,8 @@ async function processScrolls(svg: XMLDocument): Promise<VideoScrollDef[]> {
const [directionString, filesURL] = descNode.textContent!.split("\n");
const fileFetch = await fetch(`content/${filesURL}`);
const files = (await fileFetch.text()).split("\n").filter(Boolean).map((str) => `content/${str}`);
const preURL = fileFetch.url.replace(/\/files.lst$/, "");
const files = (await fileFetch.text()).split("\n").filter(Boolean).map((str) => `${preURL}/${str}`);
return {
top: el.y.baseVal.value * ratio,