aboutsummaryrefslogtreecommitdiffstats
path: root/recipes
diff options
context:
space:
mode:
authorLibravatar André Oliveira <37463445+SpecialAro@users.noreply.github.com>2023-10-18 16:08:36 +0100
committerLibravatar GitHub <noreply@github.com>2023-10-18 16:08:36 +0100
commit41bbfad276889cd70d89e936192b6e712a7c5418 (patch)
tree61ead10aa4241f021365071530d40df5b45837eb /recipes
parentadd SpecialAro as a contributor for code, and infra (#442) (diff)
downloadferdium-recipes-41bbfad276889cd70d89e936192b6e712a7c5418.tar.gz
ferdium-recipes-41bbfad276889cd70d89e936192b6e712a7c5418.tar.zst
ferdium-recipes-41bbfad276889cd70d89e936192b6e712a7c5418.zip
Instagram fix (#1403) (#443)
fix #1403
Diffstat (limited to 'recipes')
-rw-r--r--recipes/instagram/package.json4
-rw-r--r--recipes/instagram/webview.js5
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();