mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-05 06:54:36 +08:00
specifying element
This commit is contained in:
parent
9a162544cc
commit
3f50619fd9
2 changed files with 10 additions and 8 deletions
|
|
@ -24,7 +24,7 @@ function updateLongTextWarning(): void {
|
|||
export function show(): void {
|
||||
if ($(wrapper).hasClass("hidden")) {
|
||||
updateLongTextWarning();
|
||||
if ($(`${popup} .checkbox input`).prop("checked")) {
|
||||
if ($(`${popup} .randomWordsCheckbox input`).prop("checked")) {
|
||||
$(`${popup} .inputs .randomInputFields`).removeClass("disabled");
|
||||
} else {
|
||||
$(`${popup} .inputs .randomInputFields`).addClass("disabled");
|
||||
|
|
@ -103,8 +103,8 @@ $(wrapper).on("mousedown", (e) => {
|
|||
}
|
||||
});
|
||||
|
||||
$(`${popup} .inputs .checkbox input`).on("change", () => {
|
||||
if ($(`${popup} .checkbox input`).prop("checked")) {
|
||||
$(`${popup} .inputs .randomWordsCheckbox input`).on("change", () => {
|
||||
if ($(`${popup} .randomWordsCheckbox input`).prop("checked")) {
|
||||
$(`${popup} .inputs .randomInputFields`).removeClass("disabled");
|
||||
} else {
|
||||
$(`${popup} .inputs .randomInputFields`).addClass("disabled");
|
||||
|
|
@ -174,14 +174,16 @@ function apply(): void {
|
|||
CustomText.setTime(parseInt($(`${popup} .time input`).val() as string) || -1);
|
||||
|
||||
CustomText.setIsWordRandom(
|
||||
$(`${popup} .checkbox input`).prop("checked") && CustomText.word > -1
|
||||
$(`${popup} .randomWordsCheckbox input`).prop("checked") &&
|
||||
CustomText.word > -1
|
||||
);
|
||||
CustomText.setIsTimeRandom(
|
||||
$(`${popup} .checkbox input`).prop("checked") && CustomText.time > -1
|
||||
$(`${popup} .randomWordsCheckbox input`).prop("checked") &&
|
||||
CustomText.time > -1
|
||||
);
|
||||
|
||||
if (
|
||||
$(`${popup} .checkbox input`).prop("checked") &&
|
||||
$(`${popup} .randomWordsCheckbox input`).prop("checked") &&
|
||||
!CustomText.isTimeRandom &&
|
||||
!CustomText.isWordRandom
|
||||
) {
|
||||
|
|
@ -194,7 +196,7 @@ function apply(): void {
|
|||
}
|
||||
|
||||
if (
|
||||
$(`${popup} .checkbox input`).prop("checked") &&
|
||||
$(`${popup} .randomWordsCheckbox input`).prop("checked") &&
|
||||
CustomText.isTimeRandom &&
|
||||
CustomText.isWordRandom
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -449,7 +449,7 @@
|
|||
<textarea class="textarea" placeholder="Custom text"></textarea>
|
||||
</div>
|
||||
<div class="inputs">
|
||||
<label class="checkbox">
|
||||
<label class="checkbox randomWordsCheckbox">
|
||||
<input type="checkbox" />
|
||||
<div class="customTextCheckbox">
|
||||
<div class="check">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue