diff options
Diffstat (limited to 'recipes/instagram')
-rw-r--r-- | recipes/instagram/webview.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/recipes/instagram/webview.js b/recipes/instagram/webview.js index b971021..797f544 100644 --- a/recipes/instagram/webview.js +++ b/recipes/instagram/webview.js | |||
@@ -1,11 +1,13 @@ | |||
1 | const _path = _interopRequireDefault(require('path')); | 1 | const _path = _interopRequireDefault(require('path')); |
2 | 2 | ||
3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | 3 | function _interopRequireDefault(obj) { |
4 | return obj && obj.__esModule ? obj : { default: obj }; | ||
5 | } | ||
4 | 6 | ||
5 | module.exports = (Ferdi) => { | 7 | module.exports = Ferdi => { |
6 | const getMessages = () => { | 8 | const getMessages = () => { |
7 | const element = document.querySelector('a[href^="/direct/inbox"]'); | 9 | const element = document.querySelector('a[href^="/direct/inbox"]'); |
8 | Ferdi.setBadge(element ? Ferdi.safeParseInt(element.innerText) : 0); | 10 | Ferdi.setBadge(element ? Ferdi.safeParseInt(element.textContent) : 0); |
9 | }; | 11 | }; |
10 | 12 | ||
11 | Ferdi.loop(getMessages); | 13 | Ferdi.loop(getMessages); |