|
@@ -44,15 +44,15 @@ const browser = {
|
|
|
dom.requestFullscreen
|
|
|
? dom.requestFullscreen()
|
|
|
: dom.mozRequestFullScreen
|
|
|
- ? dom.mozRequestFullScreen()
|
|
|
- : dom.webkitRequestFullscreen
|
|
|
- ? dom.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)
|
|
|
- : dom.msRequestFullscreen && dom.msRequestFullscreen(),
|
|
|
+ ? dom.mozRequestFullScreen()
|
|
|
+ : dom.webkitRequestFullscreen
|
|
|
+ ? dom.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)
|
|
|
+ : dom.msRequestFullscreen && dom.msRequestFullscreen(),
|
|
|
t &&
|
|
|
- $(document).on(
|
|
|
- 'fullscreenchange webkitfullscreenchange mozfullscreenchange MSFullscreenChange',
|
|
|
- browser.requestPointerLock,
|
|
|
- );
|
|
|
+ $(document).on(
|
|
|
+ 'fullscreenchange webkitfullscreenchange mozfullscreenchange MSFullscreenChange',
|
|
|
+ browser.requestPointerLock,
|
|
|
+ );
|
|
|
},
|
|
|
requestPointerLock: function () {
|
|
|
let e;
|
|
@@ -80,19 +80,19 @@ const browser = {
|
|
|
document.exitFullscreen
|
|
|
? document.exitFullscreen()
|
|
|
: document.msExitFullscreen
|
|
|
- ? document.msExitFullscreen()
|
|
|
- : document.mozCancelFullScreen
|
|
|
- ? document.mozCancelFullScreen()
|
|
|
- : document.webkitExitFullscreen && document.webkitExitFullscreen();
|
|
|
+ ? document.msExitFullscreen()
|
|
|
+ : document.mozCancelFullScreen
|
|
|
+ ? document.mozCancelFullScreen()
|
|
|
+ : document.webkitExitFullscreen && document.webkitExitFullscreen();
|
|
|
},
|
|
|
details: function () {
|
|
|
const e = navigator.userAgent.match('(Firefox|Chrome|Safari)/([\\d]+)');
|
|
|
return e
|
|
|
? {
|
|
|
- name: e[1],
|
|
|
- version: parseInt(e[2]),
|
|
|
- platform: navigator.platform,
|
|
|
- }
|
|
|
+ name: e[1],
|
|
|
+ version: parseInt(e[2]),
|
|
|
+ platform: navigator.platform,
|
|
|
+ }
|
|
|
: {};
|
|
|
},
|
|
|
is: function (e) {
|
|
@@ -197,8 +197,8 @@ const browser = {
|
|
|
const e = $.Deferred();
|
|
|
return this.detectWebVR()
|
|
|
? (navigator.getVRDisplays().then(function (t) {
|
|
|
- t.length >= 1 && e.resolve(t[0]), e.reject(null);
|
|
|
- }),
|
|
|
+ t.length >= 1 && e.resolve(t[0]), e.reject(null);
|
|
|
+ }),
|
|
|
e)
|
|
|
: e.reject(null);
|
|
|
},
|
|
@@ -222,8 +222,8 @@ const browser = {
|
|
|
return 'boolean' == typeof t
|
|
|
? 'true' === n || '1' === n
|
|
|
: 'number' == typeof t
|
|
|
- ? parseFloat(n)
|
|
|
- : n;
|
|
|
+ ? parseFloat(n)
|
|
|
+ : n;
|
|
|
},
|
|
|
valueFromHash: function (e, t) {
|
|
|
const i = new RegExp('[#&?]' + e + '=([^#&?]*)'),
|
|
@@ -233,8 +233,8 @@ const browser = {
|
|
|
return 'boolean' == typeof t
|
|
|
? 'true' === r || '1' === r
|
|
|
: 'number' == typeof t
|
|
|
- ? parseFloat(r)
|
|
|
- : window.decodeURIComponent(r);
|
|
|
+ ? parseFloat(r)
|
|
|
+ : window.decodeURIComponent(r);
|
|
|
},
|
|
|
//-------许钟文:-------------------------------------------------
|
|
|
|