diff options
author | 2023-07-20 01:35:48 +0200 | |
---|---|---|
committer | 2023-07-20 05:05:48 +0530 | |
commit | 50c81e77598b303356895c8d97748f21b9295ccf (patch) | |
tree | fb0bc3da77fee8e03a18f0bb280b749a9e3ba792 /recipes/instagram | |
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')
-rw-r--r-- | recipes/instagram/package.json | 2 | ||||
-rw-r--r-- | recipes/instagram/webview.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/recipes/instagram/package.json b/recipes/instagram/package.json index 4b8f7ac..beb7ce0 100644 --- a/recipes/instagram/package.json +++ b/recipes/instagram/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "instagram", | 2 | "id": "instagram", |
3 | "name": "Instagram", | 3 | "name": "Instagram", |
4 | "version": "2.4.1", | 4 | "version": "2.4.2", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://instagram.com/direct/inbox", | 7 | "serviceURL": "https://instagram.com/direct/inbox", |
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); |