aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/instagram/webview.js
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/webview.js
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/webview.js')
-rw-r--r--recipes/instagram/webview.js12
1 files changed, 6 insertions, 6 deletions
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);