open all hyperlinks in new tab
This commit is contained in:
parent
f6c6e3a412
commit
ea1a96acd3
1 changed files with 10 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue