From 173a086c6b71f942aedff7a2254c52d1d49b8823 Mon Sep 17 00:00:00 2001 From: Nyan404 Date: Tue, 25 Aug 2026 04:31:49 +0300 Subject: [PATCH] docs: explain shared shed formatting helpers --- web/data/cwshed-core.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/data/cwshed-core.js b/web/data/cwshed-core.js index 12cf824..4b32b46 100644 --- a/web/data/cwshed-core.js +++ b/web/data/cwshed-core.js @@ -269,6 +269,7 @@ $('head').append(``); } + // Pads a numeric time component to two characters. function leadZero(num) { return (num < 10) ? '0' + num : num; } @@ -3046,6 +3047,7 @@ } } + // Initializes the custom movement-notes panel used during training. function cumoves() { const notes = getSettings('cuMovesNote') || ''; const p = `

Заметки:

`; @@ -3056,6 +3058,7 @@ }); } + // Adds the in-game shortcut that opens the userscript settings view. function sett() { $('head').append(``); const pattern = globals.css_cp_pattern ? 'url(https://i.imgur.com/V4TX5Cv.png), ' : ''; @@ -4149,6 +4152,7 @@ return res; } + // Normalizes a settings textarea and reports malformed IDs to the user. function validateTextarea($textarea) { let pattern = new RegExp('^' + $textarea.attr('pattern') + '$'); return $textarea.val().match(pattern);