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