Skip to content

Commit

Permalink
Change some defaults & remove sound
Browse files Browse the repository at this point in the history
  • Loading branch information
ljacqu committed Feb 1, 2020
1 parent e72bbda commit 350d069
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
Binary file removed correct.mp3
Binary file not shown.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h1 class="i18n" data-i18n="labels.appName"></h1>
<div class="col-xs-12">
<div class="input-group">
<span class="input-group-addon i18n" data-i18n="labels.runFor"></span>
<input type="number" class="form-control" id="timerlength" value="5" min="1" max="60" />
<input type="number" class="form-control" id="timerlength" value="2" min="1" max="60" />
<span class="input-group-addon i18n" data-i18n="labels.minutes"></span>
</div>
</div>
Expand All @@ -63,7 +63,7 @@ <h1 class="i18n" data-i18n="labels.appName"></h1>
<div class="col-xs-12 col-sm-6">
<div class="input-group">
<span class="input-group-addon i18n" data-i18n="labels.rangeMax"></span>
<input type="number" class="form-control" id="rangemax" value="99" step="1" min="-9999999" max="9999999" />
<input type="number" class="form-control" id="rangemax" value="12" step="1" min="-9999999" max="9999999" />
</div>
</div>
</div>
Expand Down
9 changes: 1 addition & 8 deletions js/mathtrainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@
result: 0
};

/**
* Audio to play on correct answers.
*/
var correctAudio = new Audio('correct.mp3');

/** Trainer logic. */
var trainer = {};

Expand Down Expand Up @@ -130,8 +125,6 @@
var userResult = parseInt($('#answer').val());
if (!isNaN(userResult) && userResult === question.result) {
++stats.total;
correctAudio.currentTime = 0;
correctAudio.play();
createNew();
}
};
Expand All @@ -156,7 +149,7 @@
var errorAdded = false;
/**
* Displays an error message about a configuration.
* @param {String} id The ID of the field/checkbox the error is about
* @param {String} ids The IDs of the fields/checkboxes the error is for
* @param {String} message The message to output
*/
var add = function (ids, message) {
Expand Down

0 comments on commit 350d069

Please sign in to comment.