aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/anydo
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-07-31 15:28:23 +0530
committerLibravatar Vijay A <avijayr@protonmail.com>2021-07-31 15:28:23 +0530
commit97697e3d069972844b2912a93022f4a4904a40d6 (patch)
tree53faff30fbac9d72042f593dfe1c547809f4f121 /recipes/anydo
parentAllow any url in the custom-service to allow for sites like 'http://translate... (diff)
downloadferdium-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.js1
-rw-r--r--recipes/anydo/webview.js25
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
3module.exports = Franz => Franz; 2module.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
3module.exports = (Franz) => { 1module.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};