aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/instagram/webview.js
diff options
context:
space:
mode:
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);