From 04c4ad9a6572167f049b833fc343b8eba819ac46 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Sun, 19 Feb 2017 12:58:25 +0100 Subject: [PATCH] Open clicked links the statusnet_html in a new window. --- src/components/attachment/attachment.js | 5 +++++ src/components/attachment/attachment.vue | 2 +- src/components/status/status.js | 5 +++++ src/components/status/status.vue | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js index c88497a2..57d21b28 100644 --- a/src/components/attachment/attachment.js +++ b/src/components/attachment/attachment.js @@ -20,6 +20,11 @@ const Attachment = { } }, methods: { + linkClicked ({target}) { + if (target.tagName === 'A') { + window.open(target.href, '_blank') + } + }, toggleHidden () { this.showHidden = !this.showHidden } diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index a294901b..738a1e86 100644 --- a/src/components/attachment/attachment.vue +++ b/src/components/attachment/attachment.vue @@ -18,7 +18,7 @@ Don't know how to display this... -
+
diff --git a/src/components/status/status.js b/src/components/status/status.js index 030e22b5..e75400cb 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -40,6 +40,11 @@ const Status = { UserCardContent }, methods: { + linkClicked ({target}) { + if (target.tagName === 'A') { + window.open(target.href, '_blank') + } + }, toggleReplying () { this.replying = !this.replying }, diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 47e14d28..162ab140 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -54,7 +54,7 @@ -
+