diff options
Diffstat (limited to 'recipes/instagram/webview.js')
-rw-r--r-- | recipes/instagram/webview.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/recipes/instagram/webview.js b/recipes/instagram/webview.js index 1b35c37..b63e683 100644 --- a/recipes/instagram/webview.js +++ b/recipes/instagram/webview.js | |||
@@ -18,6 +18,11 @@ module.exports = (Ferdium, settings) => { | |||
18 | ? link.getAttribute('href') | 18 | ? link.getAttribute('href') |
19 | : button.getAttribute('title'); | 19 | : button.getAttribute('title'); |
20 | 20 | ||
21 | // check if the URL is relative or absolute | ||
22 | if (url.startsWith('/')) { | ||
23 | return; | ||
24 | } | ||
25 | |||
21 | // check if we have a valid URL that is not a script nor an image: | 26 | // check if we have a valid URL that is not a script nor an image: |
22 | if (url && url !== '#' && !Ferdium.isImage(link)) { | 27 | if (url && url !== '#' && !Ferdium.isImage(link)) { |
23 | event.preventDefault(); | 28 | event.preventDefault(); |