diff options
Diffstat (limited to 'recipes/mattermost')
-rw-r--r-- | recipes/mattermost/index.js | 9 | ||||
-rw-r--r-- | recipes/mattermost/webview.js | 2 |
2 files changed, 3 insertions, 8 deletions
diff --git a/recipes/mattermost/index.js b/recipes/mattermost/index.js index 8f814fa..8ae5c17 100644 --- a/recipes/mattermost/index.js +++ b/recipes/mattermost/index.js | |||
@@ -1,13 +1,11 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => class Mattermost extends Franz { | 1 | module.exports = Franz => class Mattermost extends Franz { |
4 | async validateUrl(url) { | 2 | async validateUrl(url) { |
5 | try { | 3 | try { |
6 | const resp = await window.fetch(url, { | 4 | const resp = await window.fetch(url, { |
7 | method: 'GET', | 5 | method: 'GET', |
8 | headers: { | 6 | headers: { |
9 | 'Content-Type': 'application/json' | 7 | 'Content-Type': 'application/json', |
10 | } | 8 | }, |
11 | }); | 9 | }); |
12 | return resp.status.toString().startsWith('2'); | 10 | return resp.status.toString().startsWith('2'); |
13 | } catch (err) { | 11 | } catch (err) { |
@@ -16,5 +14,4 @@ module.exports = Franz => class Mattermost extends Franz { | |||
16 | 14 | ||
17 | return false; | 15 | return false; |
18 | } | 16 | } |
19 | 17 | }; | |
20 | }; \ No newline at end of file | ||
diff --git a/recipes/mattermost/webview.js b/recipes/mattermost/webview.js index c69c370..1d2a39c 100644 --- a/recipes/mattermost/webview.js +++ b/recipes/mattermost/webview.js | |||
@@ -1,5 +1,3 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => { | 1 | module.exports = Franz => { |
4 | const DIRECT_MESSAGES_INDIVIDUAL = '#sidebar-left .unread-title .DirectChannel__profile-picture'; | 2 | const DIRECT_MESSAGES_INDIVIDUAL = '#sidebar-left .unread-title .DirectChannel__profile-picture'; |
5 | const DIRECT_MESSAGES_GROUP = '#sidebar-left .unread-title .status--group'; | 3 | const DIRECT_MESSAGES_GROUP = '#sidebar-left .unread-title .status--group'; |