diff options
author | Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com> | 2021-08-27 18:13:24 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-27 18:13:24 +0530 |
commit | 155c4b832281348c16be1f4ef667e6e23dbf1bd8 (patch) | |
tree | d144e2de2e6c7fb2e334246e8a4aecdbeb08ef8d /recipes/hangouts/webview.js | |
parent | docs: fixed template file for creating recipe. (diff) | |
download | ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.gz ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.zst ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.zip |
chore: normalized all recipes to ensure compatibility with es6 (#639)
- Removed some calls to set badge with '0' all the time.
- Removed all 'sourceMaps' since they are all outdated atm.
Diffstat (limited to 'recipes/hangouts/webview.js')
-rw-r--r-- | recipes/hangouts/webview.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/recipes/hangouts/webview.js b/recipes/hangouts/webview.js index 8d588e9..41fced1 100644 --- a/recipes/hangouts/webview.js +++ b/recipes/hangouts/webview.js | |||
@@ -1,13 +1,11 @@ | |||
1 | module.exports = Franz => { | 1 | module.exports = Ferdi => { |
2 | const getMessages = function getMessages() { | 2 | const getMessages = function getMessages() { |
3 | // get unread messages | 3 | // get unread messages |
4 | const count = document.querySelector('#hangout-landing-chat iframe').contentWindow.document.querySelectorAll('.ee').length; | 4 | const count = document.querySelector('#hangout-landing-chat iframe').contentWindow.document.querySelectorAll('.ee').length; |
5 | 5 | ||
6 | // set Franz badge | 6 | // set Ferdi badge |
7 | Franz.setBadge(count); | 7 | Ferdi.setBadge(count); |
8 | }; | 8 | }; |
9 | 9 | ||
10 | // check for new messages every second and update Franz badge | 10 | Ferdi.loop(getMessages); |
11 | Franz.loop(getMessages); | ||
12 | }; | 11 | }; |
13 | // # sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm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