diff options
author | 2021-09-19 07:26:25 +0530 | |
---|---|---|
committer | 2021-09-19 09:11:55 +0530 | |
commit | 7517a409a1a502c747eb4598492a88cec4e8d58c (patch) | |
tree | 7b6b603b0831845ac07fe6ab8e4c52bf19c8e850 /recipes/mewe/webview.js | |
parent | Merge pull request #713 from kris7t/fix-api-access (diff) | |
download | ferdium-recipes-7517a409a1a502c747eb4598492a88cec4e8d58c.tar.gz ferdium-recipes-7517a409a1a502c747eb4598492a88cec4e8d58c.tar.zst ferdium-recipes-7517a409a1a502c747eb4598492a88cec4e8d58c.zip |
fix: fix js error; styling
Diffstat (limited to 'recipes/mewe/webview.js')
-rw-r--r-- | recipes/mewe/webview.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/recipes/mewe/webview.js b/recipes/mewe/webview.js index f22803c..fcf5918 100644 --- a/recipes/mewe/webview.js +++ b/recipes/mewe/webview.js | |||
@@ -2,12 +2,12 @@ const _path = _interopRequireDefault(require('path')); | |||
2 | 2 | ||
3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | 3 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
4 | 4 | ||
5 | const calculateTotalDirectMessages = () => | ||
6 | Array.from(document.getElementsByClassName('chats-list-element')) | ||
7 | .map(el => Ferdi.safeParseInt(el.querySelector('.m-indicator .number').innerHTML)) | ||
8 | .reduce((curr, prev) => curr + prev, 0); | ||
9 | |||
10 | module.exports = Ferdi => { | 5 | module.exports = Ferdi => { |
6 | const calculateTotalDirectMessages = () => | ||
7 | Array.from(document.getElementsByClassName('chats-list-element')) | ||
8 | .map(el => Ferdi.safeParseInt(el.querySelector('.m-indicator .number').innerHTML)) | ||
9 | .reduce((curr, prev) => curr + prev, 0); | ||
10 | |||
11 | Ferdi.loop(() => Ferdi.setBadge(calculateTotalDirectMessages())); | 11 | Ferdi.loop(() => Ferdi.setBadge(calculateTotalDirectMessages())); |
12 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); | 12 | Ferdi.injectCSS(_path.default.join(__dirname, 'service.css')); |
13 | }; | 13 | }; |