diff options
author | 2020-03-06 11:31:19 +0100 | |
---|---|---|
committer | 2020-03-06 11:31:19 +0100 | |
commit | 332bfc4139371f489a34326ebdf48ce5d4bf0b8b (patch) | |
tree | ea6d6cdaf6984a4c9d9099f545840202007d9e7d /uncompressed/franz-custom-website/index.js | |
parent | #34 Switch Office 365 Outlook recipe (diff) | |
parent | Remove discountinued Google services (Allo/Inbox) #49 #50 (diff) | |
download | ferdium-recipes-332bfc4139371f489a34326ebdf48ce5d4bf0b8b.tar.gz ferdium-recipes-332bfc4139371f489a34326ebdf48ce5d4bf0b8b.tar.zst ferdium-recipes-332bfc4139371f489a34326ebdf48ce5d4bf0b8b.zip |
Merge branch 'master' of https://github.com/getferdi/recipes
Diffstat (limited to 'uncompressed/franz-custom-website/index.js')
-rw-r--r-- | uncompressed/franz-custom-website/index.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/uncompressed/franz-custom-website/index.js b/uncompressed/franz-custom-website/index.js index 47da782..62f4218 100644 --- a/uncompressed/franz-custom-website/index.js +++ b/uncompressed/franz-custom-website/index.js | |||
@@ -4,12 +4,9 @@ module.exports = Franz => class CustomWebsite extends Franz { | |||
4 | async validateUrl(url) { | 4 | async validateUrl(url) { |
5 | try { | 5 | try { |
6 | const resp = await window.fetch(url, { | 6 | const resp = await window.fetch(url, { |
7 | method: 'GET', | 7 | method: 'GET' |
8 | headers: { | ||
9 | 'Content-Type': 'application/json' | ||
10 | } | ||
11 | }); | 8 | }); |
12 | return resp.status.toString().startsWith('2') || resp.status.toString().startsWith('3'); | 9 | return !resp.status.toString().startsWith('4'); |
13 | } catch (err) { | 10 | } catch (err) { |
14 | console.error(err); | 11 | console.error(err); |
15 | } | 12 | } |