2018-10-06 21:24:23 +08:00
|
|
|
function toggleFullscreen(){
|
|
|
|
if("requestFullscreen" in root){
|
|
|
|
if(document.fullscreenElement){
|
|
|
|
document.exitFullscreen()
|
|
|
|
}else{
|
|
|
|
root.requestFullscreen()
|
|
|
|
}
|
|
|
|
}else if("webkitRequestFullscreen" in root){
|
|
|
|
if(document.webkitFullscreenElement){
|
|
|
|
document.webkitExitFullscreen()
|
|
|
|
}else{
|
|
|
|
root.webkitRequestFullscreen()
|
|
|
|
}
|
|
|
|
}else if("mozRequestFullScreen" in root){
|
|
|
|
if(document.mozFullScreenElement){
|
|
|
|
document.mozCancelFullScreen()
|
|
|
|
}else{
|
|
|
|
root.mozRequestFullScreen()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-10-13 02:04:28 +08:00
|
|
|
var root = document.documentElement
|
|
|
|
var fullScreenSupported = "requestFullscreen" in root || "webkitRequestFullscreen" in root || "mozRequestFullScreen" in root
|
2018-10-06 21:24:23 +08:00
|
|
|
|
|
|
|
var pageEvents = new PageEvents()
|
|
|
|
var snd = {}
|
|
|
|
var p2
|
2018-10-09 14:59:36 +08:00
|
|
|
var disableBlur = false
|
2018-10-06 21:24:23 +08:00
|
|
|
var loader = new Loader(() => {
|
|
|
|
new Titlescreen()
|
|
|
|
})
|