diff options
author | 2021-07-31 15:28:23 +0530 | |
---|---|---|
committer | 2021-07-31 15:28:23 +0530 | |
commit | 97697e3d069972844b2912a93022f4a4904a40d6 (patch) | |
tree | 53faff30fbac9d72042f593dfe1c547809f4f121 /recipes/telegram-react/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/telegram-react/webview.js')
-rw-r--r-- | recipes/telegram-react/webview.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/recipes/telegram-react/webview.js b/recipes/telegram-react/webview.js index 8bc3839..030040b 100644 --- a/recipes/telegram-react/webview.js +++ b/recipes/telegram-react/webview.js | |||
@@ -1,13 +1,11 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => { | 1 | module.exports = Franz => { |
4 | const getMessages = function getMessages() { | 2 | const getMessages = function getMessages() { |
5 | let count = 0; | 3 | let count = 0; |
6 | const elements = document.querySelectorAll(".chatlist > li:not(.is-muted)"); | 4 | const elements = document.querySelectorAll('.chatlist > li:not(.is-muted)'); |
7 | if (elements) { | 5 | if (elements) { |
8 | for (let i = 0; i < elements.length; i += 1) { | 6 | for (let i = 0; i < elements.length; i += 1) { |
9 | if (elements[i].querySelector(".unread") && elements[i].querySelector(".unread").innerHTML !== 0) { | 7 | if (elements[i].querySelector('.unread') && elements[i].querySelector('.unread').innerHTML !== 0) { |
10 | count += parseInt(elements[i].querySelector(".unread").innerHTML); | 8 | count += parseInt(elements[i].querySelector('.unread').innerHTML); |
11 | } | 9 | } |
12 | } | 10 | } |
13 | } | 11 | } |