diff options
author | 2021-07-31 15:28:23 +0530 | |
---|---|---|
committer | 2021-07-31 15:28:23 +0530 | |
commit | 97697e3d069972844b2912a93022f4a4904a40d6 (patch) | |
tree | 53faff30fbac9d72042f593dfe1c547809f4f121 /recipes/canvas/webview.js | |
parent | Allow any url in the custom-service to allow for sites like 'http://translate... (diff) | |
download | ferdium-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/webview.js')
-rw-r--r-- | recipes/canvas/webview.js | 9 |
1 files changed, 3 insertions, 6 deletions
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 | |||
3 | module.exports = Ferdi => { | 1 | module.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 | ||