merge conditional subtitle fixup from pandora
This commit is contained in:
parent
57a7ad2cc3
commit
c05d0bbb44
1 changed files with 7 additions and 5 deletions
|
@ -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}
|
||||||
|
|
Loading…
Reference in a new issue