From 5153994dac526bb84c8b4438f7d14826002e9473 Mon Sep 17 00:00:00 2001 From: TheoryOfNekomata Date: Fri, 18 Aug 2023 20:17:05 +0800 Subject: [PATCH] Use HTML default values Use values in HTML for default options in conversions. --- packages/example-web/index.html | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/example-web/index.html b/packages/example-web/index.html index 1959852..54c05aa 100644 --- a/packages/example-web/index.html +++ b/packages/example-web/index.html @@ -128,13 +128,8 @@ const options = { stringify: { system: systems.enUS.shortCount, - makeGroupOptions: { - shortenMillia: false, - addTensDashes: true, - }, - finalizeOptions: { - oneGroupPerLine: true, - }, + makeGroupOptions: {}, + finalizeOptions: {}, }, parse: { system: systems.enUS.shortCount, @@ -194,6 +189,9 @@ nameInput.placeholder = createNamePlaceholder(options); }); + options.stringify.makeGroupOptions.addTensDashes = addTensDashesCheckbox.checked; + options.stringify.makeGroupOptions.shortenMillia = shortenMilliaCheckbox.checked; + options.stringify.finalizeOptions.oneGroupPerLine = oneGroupPerLineCheckbox.checked; nameInput.placeholder = createNamePlaceholder(options); } const mainForm = window.document.getElementById('mainForm');