diff options
author | 2022-04-18 06:51:50 -0500 | |
---|---|---|
committer | 2022-04-18 06:51:50 -0500 | |
commit | 18801ed0c02627e87639dc0848cab44dacc18be2 (patch) | |
tree | 15e56ba66c68bf7b4594e6c9fdef44e037b4be31 /recipes/threema/webview.js | |
parent | Remove deprecated webPreference flag (diff) | |
download | ferdium-recipes-18801ed0c02627e87639dc0848cab44dacc18be2.tar.gz ferdium-recipes-18801ed0c02627e87639dc0848cab44dacc18be2.tar.zst ferdium-recipes-18801ed0c02627e87639dc0848cab44dacc18be2.zip |
Rebranded from 'ferdi' to 'ferdium' (companion changes for the main repo PR #2)
Diffstat (limited to 'recipes/threema/webview.js')
-rw-r--r-- | recipes/threema/webview.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/recipes/threema/webview.js b/recipes/threema/webview.js index cf7d1e1..16eb20a 100644 --- a/recipes/threema/webview.js +++ b/recipes/threema/webview.js | |||
@@ -4,7 +4,7 @@ function _interopRequireDefault(obj) { | |||
4 | return obj && obj.__esModule ? obj : { default: obj }; | 4 | return obj && obj.__esModule ? obj : { default: obj }; |
5 | } | 5 | } |
6 | 6 | ||
7 | module.exports = Ferdi => { | 7 | module.exports = Ferdium => { |
8 | const getMessages = () => { | 8 | const getMessages = () => { |
9 | const elements = document.querySelectorAll( | 9 | const elements = document.querySelectorAll( |
10 | '.badge.unread-count:not(.ng-hide)', | 10 | '.badge.unread-count:not(.ng-hide)', |
@@ -13,17 +13,17 @@ module.exports = Ferdi => { | |||
13 | 13 | ||
14 | for (const element of elements) { | 14 | for (const element of elements) { |
15 | try { | 15 | try { |
16 | count += Ferdi.safeParseInt(element.textContent); | 16 | count += Ferdium.safeParseInt(element.textContent); |
17 | } catch (error) { | 17 | } catch (error) { |
18 | console.error(error); | 18 | console.error(error); |
19 | } | 19 | } |
20 | } | 20 | } |
21 | 21 | ||
22 | // set Ferdi badge | 22 | // set Ferdium badge |
23 | Ferdi.setBadge(count); | 23 | Ferdium.setBadge(count); |
24 | }; | 24 | }; |
25 | 25 | ||
26 | Ferdi.loop(getMessages); | 26 | Ferdium.loop(getMessages); |
27 | 27 | ||
28 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); | 28 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); |
29 | }; | 29 | }; |