diff options
Diffstat (limited to 'recipes/feedly')
-rw-r--r-- | recipes/feedly/index.js | 3 | ||||
-rw-r--r-- | recipes/feedly/webview.js | 8 |
2 files changed, 4 insertions, 7 deletions
diff --git a/recipes/feedly/index.js b/recipes/feedly/index.js index f6f75e3..258da41 100644 --- a/recipes/feedly/index.js +++ b/recipes/feedly/index.js | |||
@@ -1,2 +1 @@ | |||
1 | "use strict"; | module.exports = Franz => Franz; | |
2 | module.exports = Franz => Franz; \ No newline at end of file | ||
diff --git a/recipes/feedly/webview.js b/recipes/feedly/webview.js index c0f625d..b5ac7dd 100644 --- a/recipes/feedly/webview.js +++ b/recipes/feedly/webview.js | |||
@@ -1,16 +1,14 @@ | |||
1 | module.exports = Franz => { | 1 | module.exports = Franz => { |
2 | |||
3 | getMessages = () => { | 2 | getMessages = () => { |
4 | const newsDOM = document.querySelectorAll("div[title='All'] > .LeftnavListRow__count")[0].innerHTML; | 3 | const newsDOM = document.querySelectorAll("div[title='All'] > .LeftnavListRow__count")[0].innerHTML; |
5 | let counter = parseInt(newsDOM); | 4 | let counter = parseInt(newsDOM); |
6 | 5 | ||
7 | if (newsDOM.indexOf('K') !== -1 || newsDOM.indexOf('+') !== -1) { | 6 | if (newsDOM.indexOf('K') !== -1 || newsDOM.indexOf('+') !== -1) { |
8 | counter = newsDOM.substring(0, newsDOM.indexOf('K')) + '000'; | 7 | counter = `${newsDOM.substring(0, newsDOM.indexOf('K'))}000`; |
9 | } | 8 | } |
10 | 9 | ||
11 | Franz.setBadge(counter); | 10 | Franz.setBadge(counter); |
12 | }; | 11 | }; |
13 | 12 | ||
14 | Franz.loop(getMessages); | 13 | Franz.loop(getMessages); |
15 | 14 | }; | |
16 | } \ No newline at end of file | ||