diff options
Diffstat (limited to 'recipes/pushover/webview.js')
-rw-r--r-- | recipes/pushover/webview.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/recipes/pushover/webview.js b/recipes/pushover/webview.js new file mode 100644 index 0000000..b37b9e4 --- /dev/null +++ b/recipes/pushover/webview.js | |||
@@ -0,0 +1,16 @@ | |||
1 | const _path = _interopRequireDefault(require('path')); | ||
2 | |||
3 | function _interopRequireDefault(obj) { | ||
4 | return obj && obj.__esModule ? obj : { default: obj }; | ||
5 | } | ||
6 | |||
7 | module.exports = Ferdium => { | ||
8 | const getMessages = () => { | ||
9 | const totalMessages = document.querySelector('#app_0 > div.app_counter').innerHTML; | ||
10 | Ferdium.setBadge(totalMessages); | ||
11 | }; | ||
12 | |||
13 | Ferdium.loop(getMessages); | ||
14 | |||
15 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); | ||
16 | }; | ||