diff options
Diffstat (limited to 'recipes/twitch')
-rw-r--r-- | recipes/twitch/package.json | 2 | ||||
-rw-r--r-- | recipes/twitch/webview.js | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/recipes/twitch/package.json b/recipes/twitch/package.json index d9efe7d..1ba5c71 100644 --- a/recipes/twitch/package.json +++ b/recipes/twitch/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "twitch", | 2 | "id": "twitch", |
3 | "name": "Twitch", | 3 | "name": "Twitch", |
4 | "version": "1.2.0", | 4 | "version": "1.3.0", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://www.twitch.tv/{teamId}/chat", | 7 | "serviceURL": "https://www.twitch.tv/{teamId}/chat", |
diff --git a/recipes/twitch/webview.js b/recipes/twitch/webview.js index 0652545..6778fcd 100644 --- a/recipes/twitch/webview.js +++ b/recipes/twitch/webview.js | |||
@@ -1,8 +1,16 @@ | |||
1 | module.exports = (Ferdium) => { | 1 | function _interopRequireDefault(obj) { |
2 | return obj && obj.__esModule ? obj : { default: obj }; | ||
3 | } | ||
4 | |||
5 | const _path = _interopRequireDefault(require('path')); | ||
6 | |||
7 | module.exports = Ferdium => { | ||
2 | const getMessages = () => { | 8 | const getMessages = () => { |
3 | const mentions = document.querySelectorAll('.chat-line .mentioned').length; | 9 | const mentions = document.querySelectorAll('.chat-line .mentioned').length; |
4 | Ferdium.setBadge(mentions, 0); | 10 | Ferdium.setBadge(mentions, 0); |
5 | }; | 11 | }; |
6 | 12 | ||
7 | Ferdium.loop(getMessages); | 13 | Ferdium.loop(getMessages); |
14 | |||
15 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); | ||
8 | }; | 16 | }; |