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} ${layerData.title}
</h3>`) </h3>`)
data.layers[layer].forEach(annotation => { data.layers[layer].forEach(annotation => {
if (pandora.url) {
annotation.value = annotation.value.replace( annotation.value = annotation.value.replace(
/src="\//g, `src="${pandora.url.origin}/` /src="\//g, `src="${pandora.url.origin}/`
).replace( ).replace(
/href="\//g, `href="${pandora.url.origin}/` /href="\//g, `href="${pandora.url.origin}/`
) )
}
html.push(` html.push(`
<div class="annotation ${layerData.type}" data-in="${annotation.in}" data-out="${annotation.out}"> <div class="annotation ${layerData.type}" data-in="${annotation.in}" data-out="${annotation.out}">
${annotation.value} ${annotation.value}