]>
BookStack Code Mirror - hacks/commitdiff
projects
/
hacks
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
9843d55
)
Fixed bad link in new tab code
author
Dan Brown
<redacted>
Sat, 13 May 2023 15:15:32 +0000
(16:15 +0100)
committer
Dan Brown
<redacted>
Sat, 13 May 2023 15:15:32 +0000
(16:15 +0100)
Updated to module instead of using dom ready.
content/force-page-links-new-tab/head.html
patch
|
blob
|
history
diff --git
a/content/force-page-links-new-tab/head.html
b/content/force-page-links-new-tab/head.html
index 4f251e2310657ef717c6ce693b0adaea6f484b23..7d8cc30d3d32a757fc864d4b24fa54d3513f52bc 100644
(file)
--- a/
content/force-page-links-new-tab/head.html
+++ b/
content/force-page-links-new-tab/head.html
@@
-1,8
+1,6
@@
-<script>
-document.addEventListener('DOMContentLoaded', function() {
+<script type="module">
const links = document.querySelectorAll('.page-content a');
for (const link of links) {
- link
s[i]
.target = '_blank';
+ link.target = '_blank';
}
-});
</script>
\ No newline at end of file