fix relative img/href links

This commit is contained in:
j 2023-08-19 16:37:05 +02:00
parent 2bf9deb42c
commit 6c22fa70de

View file

@ -114,6 +114,11 @@ async function loadData(id, args) {
${layerData.title}
</h3>`)
data.layers[layer].forEach(annotation => {
annotation.value = annotation.value.replace(
/src="\//g, `src="${pandora.url.origin}/`
).replace(
/href="\//g, `href="${pandora.url.origin}/`
)
html.push(`
<div class="annotation ${layerData.type}" data-in="${annotation.in}" data-out="${annotation.out}">
${annotation.value}