Skip to content

Commit

Permalink
alr try that
Browse files Browse the repository at this point in the history
  • Loading branch information
cobblesteve01 committed Sep 30, 2024
1 parent c333928 commit 524272f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 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 autoplay src="/audio/rick.mp3"></audio>
<audio controls autoplay src="/audio/rick.mp3" style="opacity: 0; color: transparent;"></audio>

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

if (popup && popupContent && closeBtn) {
// Show the popup with animation
Expand All @@ -13,8 +12,6 @@ document.addEventListener("DOMContentLoaded", function() {
// Slide up out animation
popupContent.style.animation = "slideUpOut 0.5s forwards";

// Play audio when closing the popup

// Hide the popup after the animation ends
setTimeout(function() {
popup.style.display = "none";
Expand All @@ -33,11 +30,16 @@ 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.");
}

window.onload = function() {
var audio = document.getElementById('audio');
audio.play()
};
});

0 comments on commit 524272f

Please sign in to comment.