diff options
Diffstat (limited to 'recipes/clockify/webview.js')
-rw-r--r-- | recipes/clockify/webview.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/recipes/clockify/webview.js b/recipes/clockify/webview.js new file mode 100644 index 0000000..5aab471 --- /dev/null +++ b/recipes/clockify/webview.js | |||
@@ -0,0 +1,11 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => { | ||
4 | const getMessages = function getMessages() { | ||
5 | const notifications = document.querySelectorAll('.notification--number'); | ||
6 | |||
7 | Franz.setBadge(0, notifications.length >= 1 ? 1 : 0); | ||
8 | }; | ||
9 | |||
10 | Franz.loop(getMessages); | ||
11 | }; \ No newline at end of file | ||