Add Fullscreening
This commit is contained in:
parent
14a5a6607d
commit
1fadd74918
3 changed files with 40 additions and 1 deletions
28
static/ambience/fullscreen.js
Normal file
28
static/ambience/fullscreen.js
Normal file
File diff suppressed because one or more lines are too long
|
@ -8,6 +8,7 @@
|
|||
|
||||
<script src="../jquery.js"></script>
|
||||
<script src="../main.js"></script>
|
||||
<script src="./fullscreen.js"></script>
|
||||
<script src="./main.js"></script>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
|
|
|
@ -20,3 +20,13 @@ function loop() {
|
|||
window.onload = () => {
|
||||
loop()
|
||||
}
|
||||
|
||||
$(document).on('keypress',function(e) {
|
||||
if(e.which == 102) {
|
||||
if ($.fullscreen.isFullScreen()) {
|
||||
$.fullscreen.exit()
|
||||
} else {
|
||||
$("body").fullscreen()
|
||||
}
|
||||
}
|
||||
});
|
Loading…
Reference in a new issue