aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/instagram
diff options
context:
space:
mode:
authorLibravatar Alexandre <32882826+Mralexandresys@users.noreply.github.com>2023-11-26 02:34:38 +0100
committerLibravatar GitHub <noreply@github.com>2023-11-26 07:04:38 +0530
commit681f58e3beea4e639a9f22ba101af427d7a76370 (patch)
tree084ae00b50268d1ef58abee567fd30abd96e39eb /recipes/instagram
parentAdd recipe for Online Go (OGS) (#467) (diff)
downloadferdium-recipes-681f58e3beea4e639a9f22ba101af427d7a76370.tar.gz
ferdium-recipes-681f58e3beea4e639a9f22ba101af427d7a76370.tar.zst
ferdium-recipes-681f58e3beea4e639a9f22ba101af427d7a76370.zip
fix badge for Instagram (#468)
Diffstat (limited to 'recipes/instagram')
-rw-r--r--recipes/instagram/package.json2
-rw-r--r--recipes/instagram/webview.js12
2 files changed, 7 insertions, 7 deletions
diff --git a/recipes/instagram/package.json b/recipes/instagram/package.json
index e0449bb..7425164 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.5.2", 4 "version": "2.5.3",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "serviceURL": "https://instagram.com/", 7 "serviceURL": "https://instagram.com/",
diff --git a/recipes/instagram/webview.js b/recipes/instagram/webview.js
index b63e683..3092d21 100644
--- a/recipes/instagram/webview.js
+++ b/recipes/instagram/webview.js
@@ -40,12 +40,12 @@ module.exports = (Ferdium, settings) => {
40 ); 40 );
41 41
42 const getMessages = () => { 42 const getMessages = () => {
43 const element = document.querySelector('a[href^="/direct/inbox"]'); 43 const element = document.querySelector('a[href^="/direct/inbox"] span');
44 if (element) { 44 Ferdium.setBadge(
45 Ferdium.setBadge( 45 element && element.textContent
46 element.textContent ? Ferdium.safeParseInt(element.textContent) : 0, 46 ? Ferdium.safeParseInt(element.textContent)
47 ); 47 : 0,
48 } 48 );
49 }; 49 };
50 50
51 Ferdium.loop(getMessages); 51 Ferdium.loop(getMessages);