Skip to content

Commit

Permalink
timer — test sounds
Browse files Browse the repository at this point in the history
  • Loading branch information
Nunnerrs authored Feb 12, 2024
1 parent 92ca591 commit 3a189ee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 5 additions & 4 deletions timer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ <h2><!--セッティングス-->Settings</h2>
<div id="interval-container">
<div class="custom-int">
<label>Work</label><br>
<span class="min">(25-50)</span><br>
<span class="min">(15-50)</span><br>
<input id="work-interval" max="50" min="15" step="1" type="number" value="25">
</div>
<div class="custom-int">
<label>Short Break</label><br>
<span class="min">(5-10)</span><br>
<span class="min">(2-10)</span><br>
<input id="short-break-interval" max="10" min="2" step="1" type="number" value="5">
</div>
<div class="custom-int">
Expand All @@ -38,15 +38,16 @@ <h2><!--セッティングス-->Settings</h2>
<button id="default">Reset to default</button><br><br>
<p>Audio</p>
<label for="notif-sound">Notification:</label>
<select id="notif-sound">
<select id="notif-sound" value="YIPPEE">
<option value="bennett">bouken da bouken</option>
<option value="boom">VINE BOOM</option>
<option value="bubbles">cute bubbles</option>
<option value="chime">chime</option>
<option value="snore">*snore* mimimi</option>
<option value="wow">anime wow</option>
<option value="yippee">YIPPEE</option>
</select><br><br>
</select>
<button id="play-sound">Play</button><br><br>
<button class="close" id="save">Save</button><button class="close" id="cancel">Cancel</button>
</div>
<div id="float">
Expand Down
6 changes: 6 additions & 0 deletions timer/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ var lBreakInt = find("long-break-interval");
var defaultBtn = find("default");

var notifSound = find("notif-sound");
var playSound = find("play-sound");

var saveBtn = find("save");
var cancelBtn = find("cancel");
Expand Down Expand Up @@ -183,6 +184,11 @@ function setDefault() {
}
defaultBtn.onclick = setDefault;

function testSound() {
sounds[sound].play();
};
playSound.onclick = testSound;

function saveSettings() {
let s = true;
let NO = [];
Expand Down

0 comments on commit 3a189ee

Please sign in to comment.