aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/mattermost
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-07-31 15:28:23 +0530
committerLibravatar Vijay A <avijayr@protonmail.com>2021-07-31 15:28:23 +0530
commit97697e3d069972844b2912a93022f4a4904a40d6 (patch)
tree53faff30fbac9d72042f593dfe1c547809f4f121 /recipes/mattermost
parentAllow any url in the custom-service to allow for sites like 'http://translate... (diff)
downloadferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.gz
ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.zst
ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.zip
Fixed eslintrc as root for this folder; Reformatted all files.
Diffstat (limited to 'recipes/mattermost')
-rw-r--r--recipes/mattermost/index.js9
-rw-r--r--recipes/mattermost/webview.js2
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
3module.exports = Franz => class Mattermost extends Franz { 1module.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
3module.exports = Franz => { 1module.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';