diff options
Diffstat (limited to 'recipes/netlify/webview.js')
-rw-r--r-- | recipes/netlify/webview.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/recipes/netlify/webview.js b/recipes/netlify/webview.js index 6bfff02..17fd73d 100644 --- a/recipes/netlify/webview.js +++ b/recipes/netlify/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 notifications = document.querySelectorAll("circle"); | 9 | const notifications = document.querySelectorAll('circle'); |
4 | 10 | ||
5 | Ferdium.setBadge(0, notifications.length > 0 ? 1 : 0); | 11 | Ferdium.setBadge(0, notifications.length > 0 ? 1 : 0); |
6 | }; | 12 | }; |
7 | Ferdium.loop(getMessages); | 13 | Ferdium.loop(getMessages); |
14 | |||
15 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); | ||
8 | }; | 16 | }; |