diff options
Diffstat (limited to 'recipes/disqus/webview.js')
-rw-r--r-- | recipes/disqus/webview.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/recipes/disqus/webview.js b/recipes/disqus/webview.js index b5c1902..a79f5e7 100644 --- a/recipes/disqus/webview.js +++ b/recipes/disqus/webview.js | |||
@@ -1,10 +1,10 @@ | |||
1 | const getInnerInt = selector => { | ||
2 | const element = document.querySelector(selector); | ||
3 | return element && Ferdi.safeParseInt(element.innerText); | ||
4 | }; | ||
5 | |||
6 | module.exports = Ferdi => { | 1 | module.exports = Ferdi => { |
7 | const getMessages = function getMessages() { | 2 | const getInnerInt = selector => { |
3 | const element = document.querySelector(selector); | ||
4 | return element && Ferdi.safeParseInt(element.innerText); | ||
5 | }; | ||
6 | |||
7 | const getMessages = () => { | ||
8 | const direct = ( | 8 | const direct = ( |
9 | getInnerInt("header div[data-role='unread-notification-count']") || | 9 | getInnerInt("header div[data-role='unread-notification-count']") || |
10 | getInnerInt('a.has-notifs div.notif-count') || | 10 | getInnerInt('a.has-notifs div.notif-count') || |