diff options
author | Vijay A <avijayr@protonmail.com> | 2021-08-17 10:47:32 +0530 |
---|---|---|
committer | Vijay A <avijayr@protonmail.com> | 2021-08-17 10:47:32 +0530 |
commit | 212d5846427ceeacfadf5aac3f381b532f4664a1 (patch) | |
tree | 7badcbb01930e77a2b2745e189e89323111ef470 /recipes/notion/webview.js | |
parent | Moved all npm packages to the 'devDependencies' since there is no node-runtim... (diff) | |
download | ferdium-recipes-212d5846427ceeacfadf5aac3f381b532f4664a1.tar.gz ferdium-recipes-212d5846427ceeacfadf5aac3f381b532f4664a1.tar.zst ferdium-recipes-212d5846427ceeacfadf5aac3f381b532f4664a1.zip |
Cleanup of recipes to remove 'NaN' of badge variables since this is handled in the main program.
Diffstat (limited to 'recipes/notion/webview.js')
-rw-r--r-- | recipes/notion/webview.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/recipes/notion/webview.js b/recipes/notion/webview.js index d01434e..f87907e 100644 --- a/recipes/notion/webview.js +++ b/recipes/notion/webview.js | |||
@@ -4,8 +4,7 @@ module.exports = (Franz) => { | |||
4 | const indirect = 0; | 4 | const indirect = 0; |
5 | const badgeDiv = document.querySelector('.notion-sidebar-container > div > div > div > :nth-child(4) > :nth-child(2) > div > :nth-child(3) > div > div'); | 5 | const badgeDiv = document.querySelector('.notion-sidebar-container > div > div > div > :nth-child(4) > :nth-child(2) > div > :nth-child(3) > div > div'); |
6 | if (badgeDiv) { | 6 | if (badgeDiv) { |
7 | const count = parseInt(badgeDiv.innerText); | 7 | direct = parseInt(badgeDiv.innerText); |
8 | direct = isNaN(count) ? 0 : count; | ||
9 | } | 8 | } |
10 | 9 | ||
11 | Franz.setBadge(direct, indirect); | 10 | Franz.setBadge(direct, indirect); |