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/mastodon/webview.js | 46 ++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'recipes/mastodon/webview.js') diff --git a/recipes/mastodon/webview.js b/recipes/mastodon/webview.js index d3644e8..1abe7b4 100644 --- a/recipes/mastodon/webview.js +++ b/recipes/mastodon/webview.js @@ -1,28 +1,28 @@ module.exports = (Franz, options) => { - let latestStatement = $('.status time').attr('datetime'); - let latestNotify = $($('.notification__message span').get(0)).text(); + let latestStatement = $('.status time').attr('datetime'); + let latestNotify = $($('.notification__message span').get(0)).text(); - $($('div.column div.scrollable').get(0)).on('scroll', (ev) => { - latestStatement = $('.status time').attr('datetime'); - }); - $($('div.column div.scrollable').get(1)).on('scroll', (ev) => { - latestNotify = $($('.notification__message span').get(0)).text(); - }); + $($('div.column div.scrollable').get(0)).on('scroll', (ev) => { + latestStatement = $('.status time').attr('datetime'); + }); + $($('div.column div.scrollable').get(1)).on('scroll', (ev) => { + latestNotify = $($('.notification__message span').get(0)).text(); + }); - function getMessages() { - var reply = 0; - const ln = $($('.notification__message span').get(0)).text(); - if (ln != latestNotify) { - reply = 1; - } - var unread = 0; - const ls = $('.status time').attr('datetime'); - if (ls != latestStatement) { - unread = 1; - } - - Franz.setBadge(reply, unread); + function getMessages() { + let reply = 0; + const ln = $($('.notification__message span').get(0)).text(); + if (ln != latestNotify) { + reply = 1; + } + let unread = 0; + const ls = $('.status time').attr('datetime'); + if (ls != latestStatement) { + unread = 1; } - Franz.loop(getMessages); -} + Franz.setBadge(reply, unread); + } + + Franz.loop(getMessages); +}; -- cgit v1.2.3-70-g09d2