diff options
Diffstat (limited to 'recipes/disqus/webview.js')
-rw-r--r-- | recipes/disqus/webview.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/recipes/disqus/webview.js b/recipes/disqus/webview.js index 797db5f..6e10e29 100644 --- a/recipes/disqus/webview.js +++ b/recipes/disqus/webview.js | |||
@@ -1,19 +1,17 @@ | |||
1 | "use strict"; | 1 | const _path = _interopRequireDefault(require('path')); |
2 | |||
3 | var _path = _interopRequireDefault(require("path")); | ||
4 | 2 | ||
5 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | 3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
6 | 4 | ||
7 | let getInnerInt = selector => { | 5 | const getInnerInt = selector => { |
8 | const element = document.querySelector(selector); | 6 | const element = document.querySelector(selector); |
9 | return element && parseInt(element.innerText); | 7 | return element && parseInt(element.innerText); |
10 | } | 8 | }; |
11 | 9 | ||
12 | module.exports = Ferdi => { | 10 | module.exports = Ferdi => { |
13 | const getMessages = function getMessages() { | 11 | const getMessages = function getMessages() { |
14 | let direct = ( | 12 | const direct = ( |
15 | getInnerInt("header div[data-role='unread-notification-count']") || | 13 | getInnerInt("header div[data-role='unread-notification-count']") || |
16 | getInnerInt("a.has-notifs div.notif-count") || | 14 | getInnerInt('a.has-notifs div.notif-count') || |
17 | 0 | 15 | 0 |
18 | ); | 16 | ); |
19 | 17 | ||