open cross-origin links by background
This commit is contained in:
parent
71c271cdf0
commit
e2b1f0d4d5
1 changed files with 9 additions and 0 deletions
|
@ -27,6 +27,15 @@ const startFollows = (newTab) => {
|
|||
newTab
|
||||
});
|
||||
}
|
||||
if (element.href.startsWith('http://') ||
|
||||
element.href.startsWith('https://') ||
|
||||
element.href.startsWith('ftp://')) {
|
||||
return browser.runtime.sendMessage({
|
||||
type: messages.OPEN_URL,
|
||||
url: element.href,
|
||||
newTab
|
||||
});
|
||||
}
|
||||
return element.click();
|
||||
case 'input':
|
||||
switch (element.type) {
|
||||
|
|
Reference in a new issue