diff options
Diffstat (limited to 'recipes/workplace/webview.js')
-rw-r--r-- | recipes/workplace/webview.js | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/recipes/workplace/webview.js b/recipes/workplace/webview.js index af2af89..e10c449 100644 --- a/recipes/workplace/webview.js +++ b/recipes/workplace/webview.js | |||
@@ -1,6 +1,8 @@ | |||
1 | const path = require('path'); | 1 | const _path = _interopRequireDefault(require('path')); |
2 | 2 | ||
3 | module.exports = Franz => { | 3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
4 | |||
5 | module.exports = Ferdi => { | ||
4 | const getMessages = () => { | 6 | const getMessages = () => { |
5 | let direct = 0; | 7 | let direct = 0; |
6 | let indirect = 0; | 8 | let indirect = 0; |
@@ -23,18 +25,20 @@ module.exports = Franz => { | |||
23 | } | 25 | } |
24 | } | 26 | } |
25 | 27 | ||
26 | Franz.setBadge(direct, indirect); | 28 | Ferdi.setBadge(direct, indirect); |
27 | }; | 29 | }; |
28 | 30 | ||
29 | Franz.injectCSS(path.join(__dirname, 'workplace.css')); | 31 | Ferdi.loop(getMessages); |
30 | Franz.loop(getMessages); | 32 | |
33 | Ferdi.injectCSS(_path.default.join(__dirname, 'workplace.css')); | ||
34 | |||
31 | localStorage._cs_desktopNotifsEnabled = JSON.stringify({ | 35 | localStorage._cs_desktopNotifsEnabled = JSON.stringify({ |
32 | __t: new Date().getTime(), | 36 | __t: new Date().getTime(), |
33 | __v: true, | 37 | __v: true, |
34 | }); | 38 | }); |
35 | 39 | ||
36 | if (typeof Franz.onNotify === 'function') { | 40 | if (typeof Ferdi.onNotify === 'function') { |
37 | Franz.onNotify(notification => { | 41 | Ferdi.onNotify(notification => { |
38 | if (typeof notification.title !== 'string') { | 42 | if (typeof notification.title !== 'string') { |
39 | notification.title = ((notification.title.props || {}).content || [])[0] || 'Work Chat'; | 43 | notification.title = ((notification.title.props || {}).content || [])[0] || 'Work Chat'; |
40 | } | 44 | } |