Compare commits

...

4 Commits

Author SHA1 Message Date
Luc Everse 01624f4bfb Bump package version to 0.0.7 2023-02-01 15:07:25 +01:00
Luc Everse d3f3b54cae Transform entered acronym to lowercase to make regex work 2023-02-01 15:07:25 +01:00
Luc Everse d0d2be80ef Add missing error message container 2023-02-01 15:07:25 +01:00
Luc Everse 035fa6a34b Have the big button submit the form
Instead of doing nothing at all
2023-02-01 15:07:25 +01:00
3 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "debreviator",
"version": "0.0.6",
"version": "0.0.7",
"description": "Creates meaning by undoing your abbreviation.",
"author": "Florine W. Dekker",
"browser": "dist/bundle.js",

View File

@ -59,11 +59,13 @@
<input id="abbreviation" type="text" autofocus />
<small id="abbreviation-hint" data-hint-for="abbreviation"></small>
<button id="debreviate" type="button">Debreviate</button>
<button id="debreviate" type="submit">Debreviate</button>
</form>
<label for="debreviations">Debreviations</label>
<textarea id="debreviations" readonly></textarea>
<p id="abbreviation-error"></p>
</section>
<footer id="footer"></footer>
</div>

View File

@ -28,7 +28,7 @@ doAfterLoad(() => {
const debreviate = () => {
clearFormValidity(debreviateForm);
const abbreviation = abbreviationInput.value.trim();
const abbreviation = abbreviationInput.value.trim().toLowerCase();
if (abbreviation === "") {
showInputInvalid(abbreviationInput, "Abbreviation should be non-empty.");
return;