diff options
author | 2020-09-22 20:56:48 +0200 | |
---|---|---|
committer | 2020-09-22 19:56:48 +0100 | |
commit | 6f5e4a00588aefdda7a5a1cfe70935870e7e234a (patch) | |
tree | 9e29aa7aa0620a1a4a968ff8739b4b8ba96791a9 /uncompressed/icq/webview.js | |
parent | Updated logos for Outlook/OWA (diff) | |
download | ferdium-recipes-6f5e4a00588aefdda7a5a1cfe70935870e7e234a.tar.gz ferdium-recipes-6f5e4a00588aefdda7a5a1cfe70935870e7e234a.tar.zst ferdium-recipes-6f5e4a00588aefdda7a5a1cfe70935870e7e234a.zip |
Unpack recipes and update recipes icons (#292)
Co-authored-by: Amine Mouafik <amine@mouafik.fr>
Diffstat (limited to 'uncompressed/icq/webview.js')
-rw-r--r-- | uncompressed/icq/webview.js | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/uncompressed/icq/webview.js b/uncompressed/icq/webview.js deleted file mode 100644 index 34d03e0..0000000 --- a/uncompressed/icq/webview.js +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | 'use strict'; | ||
2 | |||
3 | module.exports = Franz => { | ||
4 | const getMessages = function getMessages() { | ||
5 | let directs = 0; | ||
6 | |||
7 | if (document.getElementsByClassName('nwa-msg-counter icq-recent_state-read').length > 0) { | ||
8 | const elements = document.getElementsByClassName('nwa-msg-counter icq-recent_state-read'); | ||
9 | for (let i = 0; i < elements.length; i++) { | ||
10 | const countLine = parseInt(elements[i].innerText.replace(/[^0-9.]/g, ''), 10); | ||
11 | if (!isNaN(directs) && countLine > 0) { | ||
12 | // directs += count_line; // count every message | ||
13 | directs += 1; // count 1 per channel with messages | ||
14 | } | ||
15 | } | ||
16 | } | ||
17 | |||
18 | if (isNaN(directs)) { | ||
19 | directs = 0; | ||
20 | } | ||
21 | |||
22 | Franz.setBadge(directs); | ||
23 | }; | ||
24 | |||
25 | Franz.loop(getMessages); | ||
26 | }; | ||
27 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozL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cyk7XG4gIH07XG5cbiAgRnJhbnoubG9vcChnZXRNZXNzYWdlcyk7XG59O1xuIl19 \ No newline at end of file | ||