diff options
author | 2021-07-27 20:36:48 +0530 | |
---|---|---|
committer | 2021-07-27 20:37:24 +0530 | |
commit | 19d587d8ee2d3d1cc6af0284e934f0a904482026 (patch) | |
tree | 61a094bb464df891994c114b93e25bcc4bc98048 /recipes/franz-custom-website/index.js | |
parent | Update all.json with contextIsolation recipes (diff) | |
download | ferdium-recipes-19d587d8ee2d3d1cc6af0284e934f0a904482026.tar.gz ferdium-recipes-19d587d8ee2d3d1cc6af0284e934f0a904482026.tar.zst ferdium-recipes-19d587d8ee2d3d1cc6af0284e934f0a904482026.zip |
Allow any url in the custom-service to allow for sites like 'http://translate.google.com' to work.
Diffstat (limited to 'recipes/franz-custom-website/index.js')
-rw-r--r-- | recipes/franz-custom-website/index.js | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/recipes/franz-custom-website/index.js b/recipes/franz-custom-website/index.js index 62f4218..d232644 100644 --- a/recipes/franz-custom-website/index.js +++ b/recipes/franz-custom-website/index.js | |||
@@ -2,16 +2,6 @@ | |||
2 | 2 | ||
3 | module.exports = Franz => class CustomWebsite extends Franz { | 3 | module.exports = Franz => class CustomWebsite extends Franz { |
4 | async validateUrl(url) { | 4 | async validateUrl(url) { |
5 | try { | 5 | return true; |
6 | const resp = await window.fetch(url, { | ||
7 | method: 'GET' | ||
8 | }); | ||
9 | return !resp.status.toString().startsWith('4'); | ||
10 | } catch (err) { | ||
11 | console.error(err); | ||
12 | } | ||
13 | |||
14 | return false; | ||
15 | } | 6 | } |
16 | 7 | }; | |
17 | }; \ No newline at end of file | ||