Browse Source

Use HTML default values

Use values in HTML for default options in conversions.
master
TheoryOfNekomata 1 year ago
parent
commit
5153994dac
1 changed files with 5 additions and 7 deletions
  1. +5
    -7
      packages/example-web/index.html

+ 5
- 7
packages/example-web/index.html View File

@@ -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');


Loading…
Cancel
Save