# HG changeset patch # User Matthew Wild # Date 1600183668 -3600 # Node ID 82713dfee2388baeefaff74b9271f1e97367d020 # Parent 0ba6108afcbf0b86ce8d71ca94231ee5e3497245 mod_invites_page: Fix platform detection and don't show empty list of clients for unknown platforms diff -r 0ba6108afcbf -r 82713dfee238 mod_invites_page/html/invite.html --- a/mod_invites_page/html/invite.html Tue Sep 15 16:16:16 2020 +0100 +++ b/mod_invites_page/html/invite.html Tue Sep 15 16:27:48 2020 +0100 @@ -147,10 +147,17 @@ if(platform.os.family.startsWith("Windows")) { platform_friendly = "Windows"; platform_classname = "windows"; + } else { + platform_friendly = platform.os.family; + platform_classname = platform_friendly.toLowerCase(); } } if(platform_friendly && platform_classname) { + if($('.client-card .client-platform-badge-'+platform_classname).length == 0) { + // No clients recognised for this platform, do nothing + return; + } // Hide clients not for this platform $('.client-card.app-platform-'+platform_classname).addClass("supported-platform"); $('.client-card').not(".supported-platform").hide();