From d3841b766f9d37d557646003899f67525c5f755f Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Tue, 5 Oct 2021 17:04:09 +0200 Subject: chore: add eslint-plugin-unicorn (#733) --- recipes/stackoverflow-chat/index.js | 3 +-- recipes/stackoverflow-chat/webview.js | 10 +++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'recipes/stackoverflow-chat') diff --git a/recipes/stackoverflow-chat/index.js b/recipes/stackoverflow-chat/index.js index c6cfcdf..ea29aa3 100644 --- a/recipes/stackoverflow-chat/index.js +++ b/recipes/stackoverflow-chat/index.js @@ -1,2 +1 @@ -module.exports = Ferdi => class stackoverflowchat extends Ferdi { -}; +module.exports = Ferdi => class stackoverflowchat extends Ferdi {}; diff --git a/recipes/stackoverflow-chat/webview.js b/recipes/stackoverflow-chat/webview.js index cf487b5..4157600 100644 --- a/recipes/stackoverflow-chat/webview.js +++ b/recipes/stackoverflow-chat/webview.js @@ -1,13 +1,17 @@ var _path = _interopRequireDefault(require('path')); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} module.exports = Ferdi => { const getMessages = () => { - const unreadSpan = document.querySelector('span.flag-count.message-count.unread-count'); + const unreadSpan = document.querySelector( + 'span.flag-count.message-count.unread-count', + ); let directCount = 0; if (unreadSpan) { - directCount = Ferdi.safeParseInt(unreadSpan.innerText); + directCount = Ferdi.safeParseInt(unreadSpan.textContent); } Ferdi.setBadge(directCount); }; -- cgit v1.2.3-54-g00ecf