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/redditchat/index.js | 2 +- recipes/redditchat/webview.js | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'recipes/redditchat') diff --git a/recipes/redditchat/index.js b/recipes/redditchat/index.js index 2fee1a8..46f936f 100644 --- a/recipes/redditchat/index.js +++ b/recipes/redditchat/index.js @@ -1,2 +1,2 @@ // just pass through Franz -module.exports = Franz => Franz; \ No newline at end of file +module.exports = Franz => Franz; diff --git a/recipes/redditchat/webview.js b/recipes/redditchat/webview.js index 7e209da..8b29861 100644 --- a/recipes/redditchat/webview.js +++ b/recipes/redditchat/webview.js @@ -1,13 +1,11 @@ -'use strict'; - module.exports = Franz => { // Regular expression for (*) or (1), will extract the asterisk or the number const titleRegEx = /^\(([\*\d])\)/; const getMessages = function unreadCount() { - var directCount = 0; - var indirectCount = 0; + let directCount = 0; + let indirectCount = 0; - var matchArr = document.title.match(titleRegEx); + const matchArr = document.title.match(titleRegEx); if (matchArr) { if (matchArr[1] === '*') { indirectCount = 1; @@ -17,7 +15,7 @@ module.exports = Franz => { } Franz.setBadge(directCount, indirectCount); - } + }; Franz.loop(getMessages); }; -- cgit v1.2.3-54-g00ecf