From 41bbfad276889cd70d89e936192b6e712a7c5418 Mon Sep 17 00:00:00 2001 From: André Oliveira <37463445+SpecialAro@users.noreply.github.com> Date: Wed, 18 Oct 2023 16:08:36 +0100 Subject: Instagram fix (#1403) (#443) fix #1403 --- recipes/instagram/package.json | 4 ++-- 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 @@ { "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 } } 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) => { ? 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(); -- cgit v1.2.3-54-g00ecf