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/webview.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'recipes/instagram/webview.js') 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-70-g09d2