Parcourir la source

Use HTML default values

Use values in HTML for default options in conversions.
master
TheoryOfNekomata il y a 1 an
Parent
révision
5153994dac
1 fichiers modifiés avec 5 ajouts et 7 suppressions
  1. +5
    -7
      packages/example-web/index.html

+ 5
- 7
packages/example-web/index.html Voir le fichier

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


Chargement…
Annuler
Enregistrer