diff --git a/app/src/components/SVGContent.vue b/app/src/components/SVGContent.vue index 14c07e4..98f2f70 100644 --- a/app/src/components/SVGContent.vue +++ b/app/src/components/SVGContent.vue @@ -177,6 +177,10 @@ export default defineComponent({ }); } + // Links + console.debug("[SVG] Processing hyperlinks."); + processHyperlinks(svg); + // Anchors console.debug("[SVG] Processing anchors."); anchors.value = processAnchors(svg); @@ -365,6 +369,12 @@ function processAudio(svg: XMLDocument): AudioAreaDef[] { }); } +function processHyperlinks(svg: XMLDocument) { + Array.from(svg.getElementsByTagName("a")).forEach((el) => { + el.setAttribute("target", "_blank"); + }); +} + function processStart(svg: XMLDocument): SVGRectElement | null { const start = svg.getElementById("start"); if (start) {