From 387cd970df32568f51a19b071337444a2a50da6c Mon Sep 17 00:00:00 2001 From: Jonas Nilson Date: Wed, 11 Jan 2023 20:43:50 +0100 Subject: [PATCH] Notification count instead of wallet balance The class `global_action_link` used to fetch the `header_wallet_balance` is used by other elements, which seem to be problematic. --- Source/IdleMasterExtended/CookieClient.cs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Source/IdleMasterExtended/CookieClient.cs b/Source/IdleMasterExtended/CookieClient.cs index 97535d1..67c548f 100644 --- a/Source/IdleMasterExtended/CookieClient.cs +++ b/Source/IdleMasterExtended/CookieClient.cs @@ -69,17 +69,10 @@ public static async Task IsLogined() Logger.Exception(ex, "CookieClient -> IsLogined, for url = " + Settings.Default.myProfileURL); } - // The 'global_action_link' contains the Steam profile wallet ballance. Every logged in user should have it available. - var globalActionLink = document.DocumentNode.SelectSingleNode("//a[@class='global_action_link']"); + // The 'notification_count' contains the Steam profile notifications count. Every logged in user should have it available. + var notificationCount = document.DocumentNode.SelectSingleNode("//span[@class='notification_count']"); - if (globalActionLink is object && !string.IsNullOrEmpty(globalActionLink.Id)) - { - return globalActionLink.Id == "header_wallet_balance"; - } - else - { - return false; - } + return !string.IsNullOrEmpty(notificationCount.InnerHtml); } protected override WebRequest GetWebRequest(Uri address)