diff options
author | Victor B <39555268+victorbnl@users.noreply.github.com> | 2023-07-20 01:35:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-20 05:05:48 +0530 |
commit | 50c81e77598b303356895c8d97748f21b9295ccf (patch) | |
tree | fb0bc3da77fee8e03a18f0bb280b749a9e3ba792 /recipes/instagram/webview.js | |
parent | Add Perplexity AI recipe (#388) (diff) | |
download | ferdium-recipes-50c81e77598b303356895c8d97748f21b9295ccf.tar.gz ferdium-recipes-50c81e77598b303356895c8d97748f21b9295ccf.tar.zst ferdium-recipes-50c81e77598b303356895c8d97748f21b9295ccf.zip |
Fix Instagram messages count (#387)
Diffstat (limited to 'recipes/instagram/webview.js')
-rw-r--r-- | recipes/instagram/webview.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/recipes/instagram/webview.js b/recipes/instagram/webview.js index e363ad3..c2a8433 100644 --- a/recipes/instagram/webview.js +++ b/recipes/instagram/webview.js | |||
@@ -7,7 +7,7 @@ function _interopRequireDefault(obj) { | |||
7 | module.exports = Ferdium => { | 7 | module.exports = Ferdium => { |
8 | const getMessages = () => { | 8 | const getMessages = () => { |
9 | const element = document.querySelector('a[href^="/direct/inbox"]'); | 9 | const element = document.querySelector('a[href^="/direct/inbox"]'); |
10 | Ferdium.setBadge(element ? Ferdium.safeParseInt(element.textContent) : 0); | 10 | Ferdium.setBadge(element.textContent ? Ferdium.safeParseInt(element.textContent) : 0); |
11 | }; | 11 | }; |
12 | 12 | ||
13 | Ferdium.loop(getMessages); | 13 | Ferdium.loop(getMessages); |