aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/monday
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/monday
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/monday')
-rw-r--r--recipes/monday/index.js4
-rwxr-xr-xrecipes/monday/webview.js19
2 files changed, 8 insertions, 15 deletions
diff --git a/recipes/monday/index.js b/recipes/monday/index.js
index e8243fb..258da41 100644
--- a/recipes/monday/index.js
+++ b/recipes/monday/index.js
@@ -1,3 +1 @@
1"use strict"; module.exports = Franz => Franz;
2
3module.exports = Franz => Franz; \ No newline at end of file
diff --git a/recipes/monday/webview.js b/recipes/monday/webview.js
index c5a58b6..ff83694 100755
--- a/recipes/monday/webview.js
+++ b/recipes/monday/webview.js
@@ -1,29 +1,24 @@
1"use strict"; 1const _path = _interopRequireDefault(require('path'));
2
3var _path = _interopRequireDefault(require("path"));
4 2
5function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6 4
7module.exports = Franz => { 5module.exports = Franz => {
8
9 const getMessages = function getMessages() { 6 const getMessages = function getMessages() {
10
11 let count = 0; 7 let count = 0;
12 8
13 let counters = document.querySelectorAll('.surface-control-component .item-counter, .surface-control-component .view-item-counter'); 9 const counters = document.querySelectorAll('.surface-control-component .item-counter, .surface-control-component .view-item-counter');
14 10
15 for (var i = 0; i < counters.length; i++) { 11 for (let i = 0; i < counters.length; i++) {
16 count += parseInt(counters[i].textContent); 12 count += parseInt(counters[i].textContent);
17 } 13 }
18 14
19 if (isNaN(count)) { 15 if (isNaN(count)) {
20 count = 0; 16 count = 0;
21 } 17 }
22
23 Franz.setBadge(count);
24 };
25 18
26 Franz.injectCSS(_path.default.join(__dirname, 'service.css')); 19 Franz.setBadge(count);
27 Franz.loop(getMessages); 20 };
28 21
22 Franz.injectCSS(_path.default.join(__dirname, 'service.css'));
23 Franz.loop(getMessages);
29}; 24};