From 97697e3d069972844b2912a93022f4a4904a40d6 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sat, 31 Jul 2021 15:28:23 +0530 Subject: Fixed eslintrc as root for this folder; Reformatted all files. --- recipes/monday/index.js | 4 +--- recipes/monday/webview.js | 19 +++++++------------ 2 files changed, 8 insertions(+), 15 deletions(-) (limited to 'recipes/monday') 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 @@ -"use strict"; - -module.exports = Franz => Franz; \ No newline at end of file +module.exports = Franz => Franz; 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 @@ -"use strict"; - -var _path = _interopRequireDefault(require("path")); +const _path = _interopRequireDefault(require('path')); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } module.exports = Franz => { - const getMessages = function getMessages() { - let count = 0; - let counters = document.querySelectorAll('.surface-control-component .item-counter, .surface-control-component .view-item-counter'); + const counters = document.querySelectorAll('.surface-control-component .item-counter, .surface-control-component .view-item-counter'); - for (var i = 0; i < counters.length; i++) { + for (let i = 0; i < counters.length; i++) { count += parseInt(counters[i].textContent); } if (isNaN(count)) { count = 0; } - - Franz.setBadge(count); - }; - Franz.injectCSS(_path.default.join(__dirname, 'service.css')); - Franz.loop(getMessages); + Franz.setBadge(count); + }; + Franz.injectCSS(_path.default.join(__dirname, 'service.css')); + Franz.loop(getMessages); }; -- cgit v1.2.3-54-g00ecf