summaryrefslogtreecommitdiff
path: root/links.js
diff options
context:
space:
mode:
authorDESKTOP-V026VQF\Home2023-01-11 11:19:43 +0000
committerDESKTOP-V026VQF\Home2023-01-11 11:19:43 +0000
commitc84976ea51a1ed4471533e6abf9a3743c31a469c (patch)
treeed4300160e34e40cf3015aa3ae36f1c7eaef3bbc /links.js
parente4022303c0b96007a65fa64d67db70bf9135906b (diff)
downloadmassgrave.dev-c84976ea51a1ed4471533e6abf9a3743c31a469c.zip
update
Diffstat (limited to 'links.js')
-rw-r--r--links.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/links.js b/links.js
new file mode 100644
index 0000000..5ce558e
--- /dev/null
+++ b/links.js
@@ -0,0 +1,5 @@
+(function() {
+ for (const link of document.getElementsByTagName('a')) {
+ if (/^(https?:)?\/\//.test(link.getAttribute('href'))) link.target = '_blank';
+ }
+})(); \ No newline at end of file