diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-29 20:07:23 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-29 20:07:23 +0900 |
commit | 68673957edad21700c58d252542a0aee04115d22 (patch) | |
tree | 7a58c00d82372a27b03fcbcdbf63d3fc7ec52c39 /src/content/usecases | |
parent | aea17a52d692310ac459410c7d6b4e0bfd5e0225 (diff) | |
parent | 698f905145755954647f91ae01f5966b9e35a91e (diff) |
Merge pull request #596 from ueokande/qa-0.23
QA 0.23
Diffstat (limited to 'src/content/usecases')
-rw-r--r-- | src/content/usecases/FollowSlaveUseCase.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/content/usecases/FollowSlaveUseCase.ts b/src/content/usecases/FollowSlaveUseCase.ts index a2cc80e..2bd16ee 100644 --- a/src/content/usecases/FollowSlaveUseCase.ts +++ b/src/content/usecases/FollowSlaveUseCase.ts @@ -63,16 +63,16 @@ export default class FollowSlaveUseCase { if (hint instanceof LinkHint) { let url = hint.getLink(); - // ignore taget='_blank' - if (!newTab && hint.getLinkTarget() === '_blank') { - hint.click(); - return; + let openNewTab = newTab; + // Open link by background script in order to prevent a popup block + if (hint.getLinkTarget() === '_blank') { + openNewTab = true; } // eslint-disable-next-line no-script-url if (!url || url === '#' || url.toLowerCase().startsWith('javascript:')) { return; } - await this.tabsClient.openUrl(url, newTab, background); + await this.tabsClient.openUrl(url, openNewTab, background); } else if (hint instanceof InputHint) { hint.activate(); } |