-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
delete old files, rename existing, add main.js
- Loading branch information
Showing
11 changed files
with
62 additions
and
61 deletions.
There are no files selected for viewing
File renamed without changes
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
function startSound() { | ||
const fireSound = document.getElementById("fireSound"); | ||
const start = document.getElementById("start"); | ||
const fire = document.getElementById("fire"); | ||
|
||
fire.classList.add("on"); | ||
start.style.display = "none"; | ||
|
||
fireSound.play(); | ||
} | ||
|
||
let lastClickTime = 0; | ||
document.addEventListener("click", function (event) { | ||
const currentTime = new Date().getTime(); | ||
const tapLength = currentTime - lastClickTime; | ||
if (tapLength < 500 && tapLength > 0) { | ||
toggleFullScreen(); | ||
event.preventDefault(); | ||
} | ||
lastClickTime = currentTime; | ||
}); | ||
|
||
// Toggle fullscreen mode | ||
function toggleFullScreen() { | ||
const element = document.documentElement; | ||
const isFullScreen = | ||
document.fullscreenElement || | ||
document.mozFullScreenElement || | ||
document.webkitFullscreenElement || | ||
document.msFullscreenElement; | ||
if (!isFullScreen) { | ||
if (element.requestFullscreen) { | ||
element.requestFullscreen(); | ||
} else if (element.mozRequestFullScreen) { | ||
element.mozRequestFullScreen(); | ||
} else if (element.webkitRequestFullscreen) { | ||
element.webkitRequestFullscreen(); | ||
} else if (element.msRequestFullscreen) { | ||
element.msRequestFullscreen(); | ||
} | ||
} else { | ||
if (document.exitFullscreen) { | ||
document.exitFullscreen(); | ||
} else if (document.mozCancelFullScreen) { | ||
document.mozCancelFullScreen(); | ||
} else if (document.webkitExitFullscreen) { | ||
document.webkitExitFullscreen(); | ||
} else if (document.msExitFullscreen) { | ||
document.msExitFullscreen(); | ||
} | ||
} | ||
} |
File renamed without changes
File renamed without changes
File renamed without changes