Skip to content

Commit

Permalink
Merge pull request #40 from blp1526/issue36
Browse files Browse the repository at this point in the history
Use mm:ss format
  • Loading branch information
blp1526 committed Jan 13, 2016
2 parents 6a86d89 + 6cefb83 commit f0c9d9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</div>
<div class="form-group">
<label><span class="icon icon-hourglass right-space"></span>Limit Minutes</label>
<input type="number" id="limitMinutes" class="form-control" min="1">
<input type="number" id="limitMinutes" class="form-control" min="1" max="99">
</div>
<div class="form-group">
<label><span class="icon icon-mic right-space"></span>Voice Name</label>
Expand Down
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ document.getElementById("play").addEventListener("click", function() {
document.getElementById("statusBarLeft").innerText = tk.speakerName;
function repetition() {
timeoutlId = setTimeout(repetition, 1000);
document.getElementById("statusBarRight").innerText = `${tk.currentSeconds} ${pluralize("second", tk.currentSeconds)} left`;
var minutes = ("0" + parseInt(tk.currentSeconds / 60)).substr(-2);
var seconds = ("0" + (tk.currentSeconds - (60 * minutes))).substr(-2);
document.getElementById("statusBarRight").innerText = `${minutes}:${seconds}`;
if (tk.currentSeconds !== tk.limitSeconds) {
if (tk.currentSeconds % 60 === 0) {
tk.leftMinutes--;
Expand Down

0 comments on commit f0c9d9f

Please sign in to comment.