diff --git a/recipes/discord/package.json b/recipes/discord/package.json index 4371c3c9e..d169ab963 100644 --- a/recipes/discord/package.json +++ b/recipes/discord/package.json @@ -1,7 +1,7 @@ { "id": "discord", "name": "Discord", - "version": "1.8.1", + "version": "1.8.2", "license": "MIT", "config": { "serviceURL": "https://discord.com/login", diff --git a/recipes/discord/webview.js b/recipes/discord/webview.js index 052ddac32..938b3a1bb 100644 --- a/recipes/discord/webview.js +++ b/recipes/discord/webview.js @@ -8,16 +8,14 @@ module.exports = (Ferdium, settings) => { const getMessages = () => { let directCount = 0; const directCountPerServer = document.querySelectorAll( - '[class*="lowerBadge-"] [class*="numberBadge-"]', + '[class*="lowerBadge_"] [class*="numberBadge_"]', ); for (const directCountBadge of directCountPerServer) { directCount += Ferdium.safeParseInt(directCountBadge.textContent); } - const indirectCountPerServer = document.querySelectorAll( - '[class*="modeUnread-"]', - ).length; + const indirectCountPerServer = document.title.search('• Discord') === -1 ? 0 : 1; Ferdium.setBadge(directCount, indirectCountPerServer); };