diff options
-rw-r--r-- | src/content/index.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/content/index.js b/src/content/index.js index 571a927..5f50a72 100644 --- a/src/content/index.js +++ b/src/content/index.js @@ -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) { |