From e3e44f256f44e43f03e45746e6ba2326293dffab Mon Sep 17 00:00:00 2001 From: Stoyan Stefanov Date: Sun, 25 Jun 2023 15:01:02 +0000 Subject: [PATCH] A placeholder to remind folks of the [metric name] --- www/assets/js/site.js | 1 + www/home.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/www/assets/js/site.js b/www/assets/js/site.js index 0df24f27b2..fa336e99e6 100644 --- a/www/assets/js/site.js +++ b/www/assets/js/site.js @@ -252,6 +252,7 @@ async function initCodeField(source, language = "js") { const codeArea = new CodeFlask(codeEl, { language, }); + codeArea.elTextarea.placeholder = originalTextarea.placeholder.replace(/\\n/g, '\n'); codeArea.onUpdate((code) => (hidden.value = code)); window.codeFlasks[source] = codeArea; } diff --git a/www/home.php b/www/home.php index 6d43f5245e..e8246a540a 100644 --- a/www/home.php +++ b/www/home.php @@ -932,7 +932,7 @@ function enableDisableLHSimple(){ document.addEventListener('DOMContentLoaded', () => initFileReader('custom_metrics_file', 'custom'));

- +