diff options
Diffstat (limited to 'recipes/irccloud/webview.js')
-rw-r--r-- | recipes/irccloud/webview.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/recipes/irccloud/webview.js b/recipes/irccloud/webview.js index c70e8f6..16d1519 100644 --- a/recipes/irccloud/webview.js +++ b/recipes/irccloud/webview.js | |||
@@ -1,10 +1,22 @@ | |||
1 | function _interopRequireDefault(obj) { | ||
2 | return obj && obj.__esModule ? obj : { default: obj }; | ||
3 | } | ||
4 | |||
5 | const _path = _interopRequireDefault(require('path')); | ||
6 | |||
1 | module.exports = Ferdium => { | 7 | module.exports = Ferdium => { |
2 | const getMessages = () => { | 8 | const getMessages = () => { |
3 | const directMessages = document.querySelectorAll('.buffer.conversation.active.unread.activeBadge').length; | 9 | const directMessages = document.querySelectorAll( |
4 | const indirectMessages = document.querySelectorAll('.buffer.channel.active.unread').length; | 10 | '.buffer.conversation.active.unread.activeBadge', |
11 | ).length; | ||
12 | const indirectMessages = document.querySelectorAll( | ||
13 | '.buffer.channel.active.unread', | ||
14 | ).length; | ||
5 | 15 | ||
6 | Ferdium.setBadge(directMessages, indirectMessages); | 16 | Ferdium.setBadge(directMessages, indirectMessages); |
7 | }; | 17 | }; |
8 | 18 | ||
9 | Ferdium.loop(getMessages); | 19 | Ferdium.loop(getMessages); |
20 | |||
21 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); | ||
10 | }; | 22 | }; |