aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/instagram/webview.js
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/instagram/webview.js
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/instagram/webview.js')
-rw-r--r--recipes/instagram/webview.js5
1 files changed, 5 insertions, 0 deletions
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();