aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/canvas
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/canvas
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/canvas')
-rw-r--r--recipes/canvas/index.js2
-rw-r--r--recipes/canvas/webview.js9
2 files changed, 4 insertions, 7 deletions
diff --git a/recipes/canvas/index.js b/recipes/canvas/index.js
index 415aeea..23607bd 100644
--- a/recipes/canvas/index.js
+++ b/recipes/canvas/index.js
@@ -1 +1 @@
module.exports = Ferdi => Ferdi; \ No newline at end of file module.exports = Ferdi => Ferdi;
diff --git a/recipes/canvas/webview.js b/recipes/canvas/webview.js
index 59d37e3..1bd3c84 100644
--- a/recipes/canvas/webview.js
+++ b/recipes/canvas/webview.js
@@ -1,17 +1,14 @@
1"use strict";
2
3module.exports = Ferdi => { 1module.exports = Ferdi => {
4 const getMessages = () => { 2 const getMessages = () => {
5 var direct = 0; 3 let direct = 0;
6 4
7 const MessageElement = document.querySelector('[id=global_nav_conversations_link]'); 5 const MessageElement = document.querySelector('[id=global_nav_conversations_link]');
8 if (MessageElement) { 6 if (MessageElement) {
9 direct += MessageElement.innerHTML; 7 direct += MessageElement.innerHTML;
10 } 8 }
11 9
12 Ferdi.setBadge(direct); 10 Ferdi.setBadge(direct);
13 }; 11 };
14 12
15 Ferdi.loop(getMessages); 13 Ferdi.loop(getMessages);
16 14};
17}; \ No newline at end of file