From 12217562944e7ff9e14c03149ab4854744757973 Mon Sep 17 00:00:00 2001 From: Mia <49593536+mia-pi-git@users.noreply.github.com> Date: Fri, 1 Nov 2024 13:31:22 -0500 Subject: [PATCH] Display suspect test eligibility in /rank --- play.pokemonshowdown.com/js/client-chat.js | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/play.pokemonshowdown.com/js/client-chat.js b/play.pokemonshowdown.com/js/client-chat.js index 62c683e07a..26aa49b734 100644 --- a/play.pokemonshowdown.com/js/client-chat.js +++ b/play.pokemonshowdown.com/js/client-chat.js @@ -978,8 +978,13 @@ buffer += ''; return self.add('|raw|' + buffer); } - buffer += 'FormatEloGXEGlicko-1COILWLTotal'; - + buffer += 'FormatEloGXEGlicko-1COILWLTotal'; + var suspect = false; + for (var i = 0; i < data.length; i++) { + if ('suspect' in data[i]) suspect = true; + } + if (suspect) buffer += 'Suspect test eligible?'; + buffer += ''; var hiddenFormats = []; for (var i = 0; i < data.length; i++) { var row = data[i]; @@ -1015,7 +1020,17 @@ } else { buffer += '--'; } - buffer += '' + row.w + '' + row.l + '' + N + ''; + buffer += '' + row.w + '' + row.l + '' + N + ''; + if (suspect) { + if (typeof row.suspect === 'undefined') { + buffer += '--'; + } else { + buffer += ''; + buffer += (row.suspect ? "Yes" : "No"); + buffer += ''; + } + } + buffer += ''; } if (hiddenFormats.length) { if (hiddenFormats.length === data.length) {