From 7447507ace8e34fadee199f2f8276cf0a72e66b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20C=C3=A1ceres?= Date: Fri, 13 Jun 2025 01:27:49 +0200 Subject: [PATCH 1/2] Add test name to `longStatBlock`, used when copying --- OpenBench/templatetags/mytags.py | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenBench/templatetags/mytags.py b/OpenBench/templatetags/mytags.py index 8898b969..2eb0edf2 100644 --- a/OpenBench/templatetags/mytags.py +++ b/OpenBench/templatetags/mytags.py @@ -99,6 +99,7 @@ def longStatBlock(test): lower, elo, upper = OpenBench.stats.Elo(test.results()) lines = [ + 'Test | %s' % (prettyDevName(test)), 'Elo | %0.2f +- %0.2f (95%%)' % (elo, max(upper - elo, elo - lower)), '%-5s | %s Threads=%d Hash=%dMB' % (type_text, timecontrol, threads, hashmb), ] From c216f1e79d1841d20d70781247b6cc794f5f64b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20C=C3=A1ceres?= Date: Fri, 13 Jun 2025 01:28:45 +0200 Subject: [PATCH 2/2] Add ``` when copying text --- OpenBench/static/copy_text.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenBench/static/copy_text.js b/OpenBench/static/copy_text.js index a5d72afc..3c5e4a31 100644 --- a/OpenBench/static/copy_text.js +++ b/OpenBench/static/copy_text.js @@ -1,8 +1,10 @@ function copy_text(element_id, keep_url) { - var text = document.getElementById(element_id).innerHTML; + var text = "```\n"; + text += document.getElementById(element_id).innerHTML; text = text.replace(/
/g, "\n"); + text += "\n```"; if (keep_url) text += "\n" + window.location.href;