diff options
author | 2021-07-31 15:28:23 +0530 | |
---|---|---|
committer | 2021-07-31 15:28:23 +0530 | |
commit | 97697e3d069972844b2912a93022f4a4904a40d6 (patch) | |
tree | 53faff30fbac9d72042f593dfe1c547809f4f121 /recipes/feedly/webview.js | |
parent | Allow any url in the custom-service to allow for sites like 'http://translate... (diff) | |
download | ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.gz ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.tar.zst ferdium-recipes-97697e3d069972844b2912a93022f4a4904a40d6.zip |
Fixed eslintrc as root for this folder; Reformatted all files.
Diffstat (limited to 'recipes/feedly/webview.js')
-rw-r--r-- | recipes/feedly/webview.js | 8 |
1 files changed, 3 insertions, 5 deletions
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 | ||