If the next link can't be opened in the current tab, create a new one for it instead.
This commit is contained in:
parent
93a665dc63
commit
13cd59bbe0
|
@ -36,7 +36,12 @@ browser.browserAction.onClicked.addListener(async () => {
|
|||
data: nextItem
|
||||
};
|
||||
|
||||
try {
|
||||
await browser.tabs.sendMessage(tabs[0].id!, message);
|
||||
} catch {
|
||||
await browser.tabs.create({active: true, url: nextItem.url});
|
||||
}
|
||||
|
||||
await removeQItem(nextItem.id);
|
||||
}
|
||||
}, 500);
|
||||
|
|
Loading…
Reference in New Issue