merge conditional subtitle fixup from pandora

This commit is contained in:
j 2024-02-17 10:54:05 +00:00
parent 57a7ad2cc3
commit c05d0bbb44

View file

@ -130,11 +130,13 @@ async function loadData(id, args) {
${layerData.title}
</h3>`)
data.layers[layer].forEach(annotation => {
if (pandora.url) {
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}