diff options
Diffstat (limited to 'recipes')
-rw-r--r-- | recipes/discord/package.json | 2 | ||||
-rw-r--r-- | recipes/discord/webview.js | 9 | ||||
-rw-r--r-- | recipes/zoom/package.json | 2 | ||||
-rw-r--r-- | recipes/zoom/webview.js | 4 |
4 files changed, 11 insertions, 6 deletions
diff --git a/recipes/discord/package.json b/recipes/discord/package.json index aed7ab6..fe2b078 100644 --- a/recipes/discord/package.json +++ b/recipes/discord/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "discord", | 2 | "id": "discord", |
3 | "name": "Discord", | 3 | "name": "Discord", |
4 | "version": "1.7.6", | 4 | "version": "1.7.7", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://discordapp.com/login", | 7 | "serviceURL": "https://discordapp.com/login", |
diff --git a/recipes/discord/webview.js b/recipes/discord/webview.js index 3ad4a60..bfd0683 100644 --- a/recipes/discord/webview.js +++ b/recipes/discord/webview.js | |||
@@ -33,9 +33,14 @@ module.exports = (Ferdium, settings) => { | |||
33 | 33 | ||
34 | if (link || button) { | 34 | if (link || button) { |
35 | const url = link ? link.getAttribute('href') : button.getAttribute('title'); | 35 | const url = link ? link.getAttribute('href') : button.getAttribute('title'); |
36 | const stayInsideDiscord = url.includes('https://discordapp.com/channels/'); | 36 | const skipDomains = [/^https:\/\/discordapp\.com\/channels\//i, /^https:\/\/discord\.com\/channels\//i]; |
37 | 37 | ||
38 | if (!Ferdium.isImage(url) && !stayInsideDiscord) { | 38 | skipDomains.every(skipDomain => { |
39 | stayInsideDiscord = skipDomain.test(url); | ||
40 | return !stayInsideDiscord; | ||
41 | }); | ||
42 | |||
43 | if (!Ferdium.isImage(link) && !stayInsideDiscord) { | ||
39 | event.preventDefault(); | 44 | event.preventDefault(); |
40 | event.stopPropagation(); | 45 | event.stopPropagation(); |
41 | 46 | ||
diff --git a/recipes/zoom/package.json b/recipes/zoom/package.json index 5357394..2982a9d 100644 --- a/recipes/zoom/package.json +++ b/recipes/zoom/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "zoom", | 2 | "id": "zoom", |
3 | "name": "Zoom", | 3 | "name": "Zoom", |
4 | "version": "1.3.3", | 4 | "version": "1.3.4", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://zoom.us/join", | 7 | "serviceURL": "https://zoom.us/join", |
diff --git a/recipes/zoom/webview.js b/recipes/zoom/webview.js index 1255675..45cc5b7 100644 --- a/recipes/zoom/webview.js +++ b/recipes/zoom/webview.js | |||
@@ -33,8 +33,8 @@ module.exports = (Ferdium, settings) => { | |||
33 | 33 | ||
34 | if (link || button) { | 34 | if (link || button) { |
35 | const url = link ? link.getAttribute('href') : button.getAttribute('title'); | 35 | const url = link ? link.getAttribute('href') : button.getAttribute('title'); |
36 | 36 | ||
37 | if (!Ferdium.isImage(url)) { | 37 | if (!Ferdium.isImage(link)) { |
38 | event.preventDefault(); | 38 | event.preventDefault(); |
39 | event.stopPropagation(); | 39 | event.stopPropagation(); |
40 | 40 | ||