parent
17d81099b1
commit
b5b0bcaf19
|
@ -409,7 +409,13 @@ Object.assign(handleEvent, {
|
||||||
if (chrome.windows && openWindow) {
|
if (chrome.windows && openWindow) {
|
||||||
chrome.windows.create(Object.assign(prefs.get('windowPosition'), {url}));
|
chrome.windows.create(Object.assign(prefs.get('windowPosition'), {url}));
|
||||||
} else {
|
} else {
|
||||||
openURL({url, active: openForegroundTab});
|
getOwnTab().then(({index}) => {
|
||||||
|
openURL({
|
||||||
|
url,
|
||||||
|
index: index + 1,
|
||||||
|
active: openForegroundTab
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
rememberScrollPosition();
|
rememberScrollPosition();
|
||||||
|
@ -458,7 +464,17 @@ Object.assign(handleEvent, {
|
||||||
},
|
},
|
||||||
|
|
||||||
external(event) {
|
external(event) {
|
||||||
openURL({url: event.target.closest('a').href});
|
if (event.shiftKey && !event.altKey && !event.ctrlKey && !event.metaKey) {
|
||||||
|
// Shift-click = the built-in 'open in a new window' action
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
getOwnTab().then(({index}) => {
|
||||||
|
openURL({
|
||||||
|
url: event.target.closest('a').href,
|
||||||
|
index: index + 1,
|
||||||
|
active: !event.ctrlKey || event.shiftKey,
|
||||||
|
});
|
||||||
|
});
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user