Make links target blank
Browse files- src/routes/+page.svelte +8 -0
src/routes/+page.svelte
CHANGED
@@ -277,6 +277,13 @@
|
|
277 |
};
|
278 |
}
|
279 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
onMount(async () => {
|
281 |
if (typeof createImageBitmap === 'undefined') {
|
282 |
polyfillCreateImageBitmap();
|
@@ -301,6 +308,7 @@
|
|
301 |
return false;
|
302 |
};
|
303 |
addClearCanvasControl();
|
|
|
304 |
});
|
305 |
</script>
|
306 |
|
|
|
277 |
};
|
278 |
}
|
279 |
|
280 |
+
function makeLinksTargetBlank(){
|
281 |
+
const linkEls = document.querySelectorAll("a");
|
282 |
+
for(const linkEl of linkEls){
|
283 |
+
linkEl.target = "_blank";
|
284 |
+
}
|
285 |
+
}
|
286 |
+
|
287 |
onMount(async () => {
|
288 |
if (typeof createImageBitmap === 'undefined') {
|
289 |
polyfillCreateImageBitmap();
|
|
|
308 |
return false;
|
309 |
};
|
310 |
addClearCanvasControl();
|
311 |
+
makeLinksTargetBlank();
|
312 |
});
|
313 |
</script>
|
314 |
|