Skip to content

Commit

Permalink
Revert "Background Music"
Browse files Browse the repository at this point in the history
  • Loading branch information
Akanchha112 authored Jan 27, 2024
1 parent 71370ba commit 4e547e5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 47 deletions.
2 changes: 2 additions & 0 deletions Dark/game.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ <h2 id="question"></h2>
<p class="choice-text" data-number="4"></p>
</div>


<h2 id="display">Correct option :</h2>

<label
Expand Down Expand Up @@ -81,6 +82,7 @@ <h2 id="display">Correct option :</h2>
/>
</label>


<footer>
<button class="next_btn">Next Ques</button>
</footer>
Expand Down
46 changes: 8 additions & 38 deletions Light/game.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css"
/>


</head>
<body>
<div class="container">
Expand All @@ -27,18 +28,6 @@
</div>
</div>

<div id="hud-item" class="time">
<div class="timer">
<div class="time_left_txt">Time Left</div>
<div class="timer_sec" id="timer">15</div>
</div>
<div class="time_line"></div>
</div>
<div id="hud-item">
<p class="hud-prefix">Score</p>
<h1 class="hud-main-text" id="score">0</h1>



<div id="hud-item">
<div id="hud-item" class="time">
Expand Down Expand Up @@ -123,7 +112,6 @@ <h2 id="question"></h2>
<h1 class="hud-main-text" id="score">
0
</h1>

</div>
</div>
<h2 id="question"></h2>
Expand All @@ -143,33 +131,15 @@ <h2 id="question"></h2>
<p class="choice-prefix">D</p>
<p class="choice-text" data-number="4"></p>
</div>
<label
for="un-mute"
class="unmute"
onclick="playpause()"
id="playpauseBTN"
>
<img
src="http://upload.wikimedia.org/wikipedia/commons/3/3f/Mute_Icon.svg"
alt="Mute_Icon.svg"
title="Mute icon"
/>
</label>
<label
for="un-mute"
class="mute"
onclick="playpause()"
id="playpauseBTN"
>
<img
src="http://upload.wikimedia.org/wikipedia/commons/2/21/Speaker_Icon.svg"
alt="Speaker_Icon.svg"
title="Unmute/speaker icon"
/>
</label>
<label for="un-mute" class="unmute" onclick="playpause()" id="playpauseBTN">
<img src="http://upload.wikimedia.org/wikipedia/commons/3/3f/Mute_Icon.svg" alt="Mute_Icon.svg" title="Mute icon">
</label>
<label for="un-mute" class="mute" onclick="playpause()" id="playpauseBTN">
<img src="http://upload.wikimedia.org/wikipedia/commons/2/21/Speaker_Icon.svg" alt="Speaker_Icon.svg" title="Unmute/speaker icon">
</label>
<footer>
<button class="next_btn">Next Ques</button>
</footer>
</footer>
</div>
</div>

Expand Down
14 changes: 5 additions & 9 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@ let bgMusic = new Audio(`/assets/music_bg/${index}.mp3`);

function changeMusic() {
bgMusic.src = `/assets/music_bg${index}.mp3`;

if (index <= 5) {

if (index <= music.length) {

index += 1;
} else {
index = 1;
}
if (index <= music.length) {
index += 1;
} else {
index = 1;
}
}

window.addEventListener("load", () => {
Expand Down

0 comments on commit 4e547e5

Please sign in to comment.