diff options
author | Vijay A <avijayr@protonmail.com> | 2021-07-31 15:28:23 +0530 |
---|---|---|
committer | Vijay A <avijayr@protonmail.com> | 2021-07-31 15:28:23 +0530 |
commit | 97697e3d069972844b2912a93022f4a4904a40d6 (patch) | |
tree | 53faff30fbac9d72042f593dfe1c547809f4f121 /recipes/anydo | |
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/anydo')
-rw-r--r-- | recipes/anydo/index.js | 1 | ||||
-rw-r--r-- | recipes/anydo/webview.js | 25 |
2 files changed, 11 insertions, 15 deletions
diff --git a/recipes/anydo/index.js b/recipes/anydo/index.js index a028916..46f936f 100644 --- a/recipes/anydo/index.js +++ b/recipes/anydo/index.js | |||
@@ -1,3 +1,2 @@ | |||
1 | "use strict"; | ||
2 | // just pass through Franz | 1 | // just pass through Franz |
3 | module.exports = Franz => Franz; | 2 | module.exports = Franz => Franz; |
diff --git a/recipes/anydo/webview.js b/recipes/anydo/webview.js index aaff6dc..e35bfb5 100644 --- a/recipes/anydo/webview.js +++ b/recipes/anydo/webview.js | |||
@@ -1,20 +1,17 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = (Franz) => { | 1 | module.exports = (Franz) => { |
4 | function getTasks() { | 2 | function getTasks() { |
5 | 3 | let incompleteCount = 0; | |
6 | let incompleteCount = 0; | ||
7 | 4 | ||
8 | const countEls = document.querySelectorAll('.AppSidebarListsItems__itemContainer__sizeContainer:not([hidden]) > .AppSidebarListsItems__itemContainer__size'); | 5 | const countEls = document.querySelectorAll('.AppSidebarListsItems__itemContainer__sizeContainer:not([hidden]) > .AppSidebarListsItems__itemContainer__size'); |
9 | 6 | ||
10 | if (countEls.length) { | 7 | if (countEls.length) { |
11 | Array.from(countEls).forEach((el) => { | 8 | Array.from(countEls).forEach((el) => { |
12 | incompleteCount += parseInt(el.innerHTML, 10); | 9 | incompleteCount += parseInt(el.innerHTML, 10); |
13 | }); | 10 | }); |
14 | } | ||
15 | |||
16 | Franz.setBadge(incompleteCount); | ||
17 | } | 11 | } |
18 | 12 | ||
19 | Franz.loop(getTasks); | 13 | Franz.setBadge(incompleteCount); |
14 | } | ||
15 | |||
16 | Franz.loop(getTasks); | ||
20 | }; | 17 | }; |