diff options
Diffstat (limited to 'uncompressed/workplace/webview.js')
-rw-r--r-- | uncompressed/workplace/webview.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/uncompressed/workplace/webview.js b/uncompressed/workplace/webview.js new file mode 100644 index 0000000..c1df892 --- /dev/null +++ b/uncompressed/workplace/webview.js | |||
@@ -0,0 +1,16 @@ | |||
1 | 'use strict'; | ||
2 | |||
3 | const path = require('path'); | ||
4 | |||
5 | module.exports = Franz => { | ||
6 | const getMessages = () => { | ||
7 | const $messages = document.querySelector('.uiScrollableAreaContent'); | ||
8 | const $unreadMessages = $messages.querySelectorAll('._1ht3 ._1ht6'); | ||
9 | |||
10 | Franz.setBadge($unreadMessages.length); | ||
11 | }; | ||
12 | |||
13 | Franz.injectCSS(path.join(__dirname, 'workplace.css')); | ||
14 | Franz.loop(getMessages); | ||
15 | }; | ||
16 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndvcmtwbGFjZS93ZWJ2aWV3LmpzIl0sIm5hbWVzIjpbInBhdGgiLCJyZXF1aXJlIiwibW9kdWxlIiwiZXhwb3J0cyIsIkZyYW56IiwiZ2V0TWVzc2FnZXMiLCIkbWVzc2FnZXMiLCJkb2N1bWVudCIsInF1ZXJ5U2VsZWN0b3IiLCIkdW5yZWFkTWVzc2FnZXMiLCJxdWVyeVNlbGVjdG9yQWxsIiwic2V0QmFkZ2UiLCJsZW5ndGgiLCJpbmplY3RDU1MiLCJqb2luIiwiX19kaXJuYW1lIiwibG9vcCJdLCJtYXBwaW5ncyI6Ijs7QUFBQSxNQUFNQSxPQUFPQyxRQUFRLE1BQVIsQ0FBYjs7QUFFQUMsT0FBT0MsT0FBUCxHQUFrQkMsS0FBRCxJQUFXO0FBQzFCLFFBQU1DLGNBQWMsTUFBTTtBQUN4QixVQUFNQyxZQUFZQyxTQUFTQyxhQUFULENBQXVCLDBCQUF2QixDQUFsQjtBQUNBLFVBQU1DLGtCQUFr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