Skip to content

Commit

Permalink
Instagram fix (#1403) (#443)
Browse files Browse the repository at this point in the history
fix #1403
  • Loading branch information
SpecialAro authored Oct 18, 2023
1 parent 6535636 commit 41bbfad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions recipes/instagram/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"id": "instagram",
"name": "Instagram",
"version": "2.5.1",
"version": "2.5.2",
"license": "MIT",
"config": {
"serviceURL": "https://instagram.com/direct/inbox",
"serviceURL": "https://instagram.com/",
"hasNotificationSound": true
}
}
5 changes: 5 additions & 0 deletions recipes/instagram/webview.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ module.exports = (Ferdium, settings) => {
? link.getAttribute('href')
: button.getAttribute('title');

// check if the URL is relative or absolute
if (url.startsWith('/')) {
return;
}

// check if we have a valid URL that is not a script nor an image:
if (url && url !== '#' && !Ferdium.isImage(link)) {
event.preventDefault();
Expand Down

0 comments on commit 41bbfad

Please sign in to comment.