diff options
author | 2021-10-05 17:04:09 +0200 | |
---|---|---|
committer | 2021-10-05 17:04:09 +0200 | |
commit | d3841b766f9d37d557646003899f67525c5f755f (patch) | |
tree | 1bcab990c94f2b05678b7a83ffebe08298500f0b /recipes/glowing-bear | |
parent | chore: repo maintenance (#732) (diff) | |
download | ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.tar.gz ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.tar.zst ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.zip |
chore: add eslint-plugin-unicorn (#733)
Diffstat (limited to 'recipes/glowing-bear')
-rw-r--r-- | recipes/glowing-bear/webview.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/recipes/glowing-bear/webview.js b/recipes/glowing-bear/webview.js index 6abd69a..8bb9dfd 100644 --- a/recipes/glowing-bear/webview.js +++ b/recipes/glowing-bear/webview.js | |||
@@ -3,8 +3,11 @@ module.exports = Ferdi => { | |||
3 | const indirectElements = document.querySelectorAll('.badge:not(.danger)'); | 3 | const indirectElements = document.querySelectorAll('.badge:not(.danger)'); |
4 | const direct = document.querySelectorAll('.badge.danger').length - 1; | 4 | const direct = document.querySelectorAll('.badge.danger').length - 1; |
5 | let indirect = -1; | 5 | let indirect = -1; |
6 | for (let i = 0; i < indirectElements.length; i += 1) { | 6 | for (const indirectElement of indirectElements) { |
7 | if (indirectElements[i].innerHTML.length > 0) { | 7 | if ( |
8 | indirectElement.textContent && | ||
9 | indirectElement.textContent.length > 0 | ||
10 | ) { | ||
8 | indirect++; | 11 | indirect++; |
9 | } | 12 | } |
10 | } | 13 | } |