aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/zulip
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-10-05 17:04:09 +0200
committerLibravatar GitHub <noreply@github.com>2021-10-05 17:04:09 +0200
commitd3841b766f9d37d557646003899f67525c5f755f (patch)
tree1bcab990c94f2b05678b7a83ffebe08298500f0b /recipes/zulip
parentchore: repo maintenance (#732) (diff)
downloadferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.tar.gz
ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.tar.zst
ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.zip
chore: add eslint-plugin-unicorn (#733)
Diffstat (limited to 'recipes/zulip')
-rw-r--r--recipes/zulip/index.js4
-rw-r--r--recipes/zulip/webview.js8
2 files changed, 8 insertions, 4 deletions
diff --git a/recipes/zulip/index.js b/recipes/zulip/index.js
index 5854600..8bad3cf 100644
--- a/recipes/zulip/index.js
+++ b/recipes/zulip/index.js
@@ -12,8 +12,8 @@ module.exports = Ferdi => class Zulip extends Ferdi {
12 const data = await resp.json(); 12 const data = await resp.json();
13 13
14 return Object.hasOwnProperty.call(data, 'realm_uri'); 14 return Object.hasOwnProperty.call(data, 'realm_uri');
15 } catch (err) { 15 } catch (error) {
16 console.error(err); 16 console.error(error);
17 } 17 }
18 18
19 return false; 19 return false;
diff --git a/recipes/zulip/webview.js b/recipes/zulip/webview.js
index 3de6c90..e9c13c0 100644
--- a/recipes/zulip/webview.js
+++ b/recipes/zulip/webview.js
@@ -1,6 +1,10 @@
1module.exports = (Ferdi) => { 1module.exports = Ferdi => {
2 const getMessages = () => { 2 const getMessages = () => {
3 const allMessages = Math.round(document.querySelectorAll('#global_filters .top_left_all_messages .count .value')[0].innerText); 3 const allMessages = Math.round(
4 document.querySelectorAll(
5 '#global_filters .top_left_all_messages .count .value',
6 )[0].textContent,
7 );
4 Ferdi.setBadge(allMessages); 8 Ferdi.setBadge(allMessages);
5 }; 9 };
6 10