From d7248b11e5f227871490a527cba66c373536df76 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Thu, 21 Nov 2024 10:21:39 -0800 Subject: [PATCH] feat: Add live search functionality to leaderboard tables --- aider/website/docs/leaderboards/index.md | 40 ++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/aider/website/docs/leaderboards/index.md b/aider/website/docs/leaderboards/index.md index 1593416a5..5056c8d20 100644 --- a/aider/website/docs/leaderboards/index.md +++ b/aider/website/docs/leaderboards/index.md @@ -31,6 +31,10 @@ This measures the LLM's coding ability, and whether it can write new code that integrates into existing code. The model also has to successfully apply all its changes to the source file without human intervention. + + + + @@ -132,6 +136,42 @@ The model also has to successfully apply all its changes to the source file with }); updateChart(); + // Add search functionality for edit table + document.getElementById('editSearchInput').addEventListener('keyup', function() { + var searchText = this.value.toLowerCase(); + var tableBody = document.querySelector('table:first-of-type tbody'); + var rows = tableBody.getElementsByTagName('tr'); + + for (var i = 0; i < rows.length; i++) { + var rowText = rows[i].textContent.toLowerCase(); + if (rowText.includes(searchText)) { + rows[i].style.display = ''; + } else { + rows[i].style.display = 'none'; + } + } + updateChart(); + }); + }); + +