Skip to content

Commit

Permalink
test something out for me pls
Browse files Browse the repository at this point in the history
  • Loading branch information
cobblesteve01 committed Sep 30, 2024
1 parent d291938 commit c333928
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ <h2 style="font-size: 35px; font-weight: 600;">What's New in v8.6.3</h2>
</div>
</center> -

<audio controls src="/audio/ooga-booga.mp3"></audio>
<audio controls autoplay src="/audio/rick.mp3"></audio>

<!-- Begin of Chaport Live Chat code -->
<script type="text/javascript">
Expand Down
6 changes: 3 additions & 3 deletions popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ document.addEventListener("DOMContentLoaded", function() {
const closeBtn = document.querySelector(".close-btn");
const audio = document.getElementById("audio"); // Reference to the audio element

if (popup && popupContent && closeBtn && audio) {
if (popup && popupContent && closeBtn) {
// Show the popup with animation
popup.style.display = "flex";
popupContent.style.animation = "slideUp 0.5s forwards";
Expand All @@ -14,7 +14,6 @@ document.addEventListener("DOMContentLoaded", function() {
popupContent.style.animation = "slideUpOut 0.5s forwards";

// Play audio when closing the popup
audio.play();

// Hide the popup after the animation ends
setTimeout(function() {
Expand All @@ -34,10 +33,11 @@ document.addEventListener("DOMContentLoaded", function() {

document.addEventListener("keydown", function(event) {
if (event.key === "Escape") {
audio.play()
closePopup();
}
});
} else {
console.error("One or more required elements not found.");
}
});
});

0 comments on commit c333928

Please sign in to comment.