aboutsummaryrefslogtreecommitdiff
path: root/xP
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2022-09-10 16:14:12 +0200
committerPřemysl Eric Janouch <p@janouch.name>2022-09-10 17:05:39 +0200
commit9eaf78f8239cc731b1e7007015abb68fdbefd84c (patch)
tree083023b447ff3695dcd6e786689549cd0f65e526 /xP
parent5f02dddd1103c78677a07b02ec7b4b9594fcc36d (diff)
downloadxK-9eaf78f8239cc731b1e7007015abb68fdbefd84c.tar.gz
xK-9eaf78f8239cc731b1e7007015abb68fdbefd84c.tar.xz
xK-9eaf78f8239cc731b1e7007015abb68fdbefd84c.zip
xP: open links in a new tab/window
Diffstat (limited to 'xP')
-rw-r--r--xP/public/xP.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/xP/public/xP.js b/xP/public/xP.js
index 91a7f75..95ee879 100644
--- a/xP/public/xP.js
+++ b/xP/public/xP.js
@@ -358,7 +358,7 @@ let Content = {
while ((match = re.exec(text)) !== null) {
if (end < match.index)
a.push(m('span', attrs, text.substring(end, match.index)))
- a.push(m('a', {href: match[0], ...attrs}, match[0]))
+ a.push(m('a[target=_blank]', {href: match[0], ...attrs}, match[0]))
end = re.lastIndex
}
if (end < text.length)