diff options
| author | Edijs <iamedijs@hotmail.com> | 2019-02-06 11:34:21 -0700 |
|---|---|---|
| committer | Edijs <iamedijs@hotmail.com> | 2019-02-06 11:34:21 -0700 |
| commit | a12397cf387da7d411184a72f9c128ba6486a631 (patch) | |
| tree | f4db3e6dd449ade3e131a971a33add3583ced7eb /src | |
| parent | 3d337a239e9fc5f1ca84131fc1bed68b1db53178 (diff) | |
Hashtag opens in same tab
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/status/status.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js index 65ddcb9f..cccb19cc 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -282,8 +282,15 @@ const Status = { this.$router.push(link) return } + } else { + if (target.hostname === window.location.hostname) { + // if the hashtag's target is current instance, open in same tab + this.$router.push(target.pathname) + } else { + // if it is different instance, open in a new tab + window.open(target.href, '_blank') + } } - window.open(target.href, '_blank') } }, toggleReplying () { |
