From 6d6d1102d9c899ef3f5e763949be691f7de9cdbd Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 4 Dec 2018 11:38:00 +0300 Subject: [PATCH] made links in user bio always open in new tabs --- src/components/user_card_content/user_card_content.js | 8 ++++++++ src/components/user_card_content/user_card_content.vue | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/user_card_content/user_card_content.js b/src/components/user_card_content/user_card_content.js index b5dd9b91..9de27a9e 100644 --- a/src/components/user_card_content/user_card_content.js +++ b/src/components/user_card_content/user_card_content.js @@ -98,6 +98,14 @@ export default { const store = this.$store store.commit('setProfileView', { v }) } + }, + linkClicked ({target}) { + if (target.tagName === 'SPAN') { + target = target.parentNode + } + if (target.tagName === 'A') { + window.open(target.href, '_blank') + } } } } diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue index 84669d7f..87b2735a 100644 --- a/src/components/user_card_content/user_card_content.vue +++ b/src/components/user_card_content/user_card_content.vue @@ -105,7 +105,7 @@ {{user.followers_count}} -

+

{{ user.description }}