diff options
Diffstat (limited to 'recipes/disqus')
-rw-r--r-- | recipes/disqus/package.json | 2 | ||||
-rw-r--r-- | recipes/disqus/webview.js | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/recipes/disqus/package.json b/recipes/disqus/package.json index 73f9a24..11ce689 100644 --- a/recipes/disqus/package.json +++ b/recipes/disqus/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "disqus", | 2 | "id": "disqus", |
3 | "name": "Disqus", | 3 | "name": "Disqus", |
4 | "version": "1.1.1", | 4 | "version": "1.1.2", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://disqus.com/home/" | 7 | "serviceURL": "https://disqus.com/home/" |
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') || |