aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/stackoverflow-chat
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-10-05 17:04:09 +0200
committerLibravatar GitHub <noreply@github.com>2021-10-05 17:04:09 +0200
commitd3841b766f9d37d557646003899f67525c5f755f (patch)
tree1bcab990c94f2b05678b7a83ffebe08298500f0b /recipes/stackoverflow-chat
parentchore: repo maintenance (#732) (diff)
downloadferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.tar.gz
ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.tar.zst
ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.zip
chore: add eslint-plugin-unicorn (#733)
Diffstat (limited to 'recipes/stackoverflow-chat')
-rw-r--r--recipes/stackoverflow-chat/index.js3
-rw-r--r--recipes/stackoverflow-chat/webview.js10
2 files changed, 8 insertions, 5 deletions
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 @@
1module.exports = Ferdi => class stackoverflowchat extends Ferdi { module.exports = Ferdi => class stackoverflowchat extends Ferdi {};
2};
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 @@
1var _path = _interopRequireDefault(require('path')); 1var _path = _interopRequireDefault(require('path'));
2 2
3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 3function _interopRequireDefault(obj) {
4 return obj && obj.__esModule ? obj : { default: obj };
5}
4 6
5module.exports = Ferdi => { 7module.exports = Ferdi => {
6 const getMessages = () => { 8 const getMessages = () => {
7 const unreadSpan = document.querySelector('span.flag-count.message-count.unread-count'); 9 const unreadSpan = document.querySelector(
10 'span.flag-count.message-count.unread-count',
11 );
8 let directCount = 0; 12 let directCount = 0;
9 if (unreadSpan) { 13 if (unreadSpan) {
10 directCount = Ferdi.safeParseInt(unreadSpan.innerText); 14 directCount = Ferdi.safeParseInt(unreadSpan.textContent);
11 } 15 }
12 Ferdi.setBadge(directCount); 16 Ferdi.setBadge(directCount);
13 }; 17 };