diff options
Diffstat (limited to 'recipes/instagram')
-rw-r--r-- | recipes/instagram/package.json | 4 | ||||
-rw-r--r-- | recipes/instagram/webview.js | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/recipes/instagram/package.json b/recipes/instagram/package.json index 9bdc70b..e0449bb 100644 --- a/recipes/instagram/package.json +++ b/recipes/instagram/package.json | |||
@@ -1,10 +1,10 @@ | |||
1 | { | 1 | { |
2 | "id": "instagram", | 2 | "id": "instagram", |
3 | "name": "Instagram", | 3 | "name": "Instagram", |
4 | "version": "2.5.1", | 4 | "version": "2.5.2", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://instagram.com/direct/inbox", | 7 | "serviceURL": "https://instagram.com/", |
8 | "hasNotificationSound": true | 8 | "hasNotificationSound": true |
9 | } | 9 | } |
10 | } | 10 | } |
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(); |