aboutsummaryrefslogtreecommitdiff
path: root/src/content/usecases
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-05-29 20:07:23 +0900
committerGitHub <noreply@github.com>2019-05-29 20:07:23 +0900
commit68673957edad21700c58d252542a0aee04115d22 (patch)
tree7a58c00d82372a27b03fcbcdbf63d3fc7ec52c39 /src/content/usecases
parentaea17a52d692310ac459410c7d6b4e0bfd5e0225 (diff)
parent698f905145755954647f91ae01f5966b9e35a91e (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.ts10
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();
}