Remove unnecessary valid indicators on inputs
This commit is contained in:
parent
9fafb5e66b
commit
ba72dec3e2
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "simplify-fractions",
|
"name": "simplify-fractions",
|
||||||
"version": "1.2.9",
|
"version": "1.2.10",
|
||||||
"description": "Simple web tool for simplifying fractions",
|
"description": "Simple web tool for simplifying fractions",
|
||||||
"author": "Florine W. Dekker",
|
"author": "Florine W. Dekker",
|
||||||
"browser": "dist/bundle.js",
|
"browser": "dist/bundle.js",
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
"deploy": "grunt deploy"
|
"deploy": "grunt deploy"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"katex": "^0.15.2"
|
"katex": "^0.16.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"css-loader": "^6.7.2",
|
"css-loader": "^6.7.2",
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
<meta name="description" content="Simplify fractions." />
|
<meta name="description" content="Simplify fractions." />
|
||||||
<meta name="theme-color" content="#0033cc" />
|
<meta name="theme-color" content="#0033cc" />
|
||||||
|
|
||||||
|
<meta name="fwd:auto:show-main" />
|
||||||
|
<meta name="fwd:auto:autofocus" />
|
||||||
<meta name="fwd:nav:target" content="#nav" />
|
<meta name="fwd:nav:target" content="#nav" />
|
||||||
<meta name="fwd:nav:highlight-path" content="/Tools/Simplify Fractions/" />
|
<meta name="fwd:nav:highlight-path" content="/Tools/Simplify Fractions/" />
|
||||||
<meta name="fwd:footer:target" content="#footer" />
|
<meta name="fwd:footer:target" content="#footer" />
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// noinspection JSUnresolvedVariable
|
// noinspection JSUnresolvedVariable
|
||||||
const {$, doAfterLoad} = window.fwdekker;
|
const {$, doAfterLoad} = window.fwdekker;
|
||||||
// noinspection JSUnresolvedVariable
|
// noinspection JSUnresolvedVariable
|
||||||
const {clearFormValidity, showInputInvalid, showInputValid} = window.fwdekker.validation;
|
const {clearFormValidity, showInputInvalid} = window.fwdekker.validation;
|
||||||
|
|
||||||
import katex from "katex";
|
import katex from "katex";
|
||||||
import "katex/dist/katex.min.css";
|
import "katex/dist/katex.min.css";
|
||||||
|
@ -102,11 +102,6 @@ class Fraction {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
doAfterLoad(() => {
|
|
||||||
$("main").classList.remove("hidden");
|
|
||||||
$("[autofocus]").focus();
|
|
||||||
});
|
|
||||||
|
|
||||||
doAfterLoad(() => {
|
doAfterLoad(() => {
|
||||||
const numeratorInput = $("#numerator");
|
const numeratorInput = $("#numerator");
|
||||||
const denominatorInput = $("#denominator");
|
const denominatorInput = $("#denominator");
|
||||||
|
@ -129,8 +124,6 @@ doAfterLoad(() => {
|
||||||
} else if (!isInt(numerator)) {
|
} else if (!isInt(numerator)) {
|
||||||
isValid = false;
|
isValid = false;
|
||||||
showInputInvalid(numeratorInput, "Enter an integer.");
|
showInputInvalid(numeratorInput, "Enter an integer.");
|
||||||
} else {
|
|
||||||
showInputValid(numeratorInput);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (denominator.trim() === "") {
|
if (denominator.trim() === "") {
|
||||||
|
@ -141,8 +134,6 @@ doAfterLoad(() => {
|
||||||
} else if (+denominator === 0) {
|
} else if (+denominator === 0) {
|
||||||
isValid = false;
|
isValid = false;
|
||||||
showInputInvalid(denominatorInput, "Enter a number other than zero.");
|
showInputInvalid(denominatorInput, "Enter a number other than zero.");
|
||||||
} else {
|
|
||||||
showInputValid(denominatorInput);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return isValid;
|
return isValid;
|
||||||
|
|
Loading…
Reference in New Issue