Skip to content

Commit

Permalink
Add checkbox to disable timer.
Browse files Browse the repository at this point in the history
  • Loading branch information
jerjou committed May 11, 2021
1 parent 58d994d commit d9d729c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions math.css
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,7 @@ button.regenerate {
float: right;
padding: .5rem 1rem;
}

input:checked + div.time {
display: none;
}
5 changes: 3 additions & 2 deletions math.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Array.prototype.slideBy = function(windo) {
let end = 1 + this.length - windo;
return [...Array(end).keys()].map(i => this.slice(i, i + windo));
};
let rint = (max) => Math.floor(max * Math.random());
let numDigits = (n) => Math.log10(n) + 1 | 0;
let rint = max => Math.floor(max * Math.random());
let numDigits = n => Math.log10(n) + 1 | 0;

// Generates a set of random numbers that sum to the first element of the
// returned array
Expand Down Expand Up @@ -132,6 +132,7 @@ addEventListener('DOMContentLoaded', _ => {
});
container.appendChild(regenerate);

container.appendChild($el('input', {type:'checkbox'}));
container.appendChild($el('div', {className:'time'}));
});

0 comments on commit d9d729c

Please sign in to comment.