File manager - Edit - /home/c14075/dragmet-ural.ru/www/bitrix/js/im/v2/lib/utils/src/device.js
Back
import {Type} from 'main.core'; const UA = navigator.userAgent.toLowerCase(); export const DeviceUtil = { isDesktop(): boolean { return !this.isMobile(); }, isMobile(): boolean { if (!Type.isUndefined(this.isMobileStatic)) { return this.isMobileStatic; } this.isMobileStatic = ( UA.includes('android') || UA.includes('webos') || UA.includes('iphone') || UA.includes('ipad') || UA.includes('ipod') || UA.includes('blackberry') || UA.includes('windows phone') ); return this.isMobileStatic; }, orientationHorizontal: 'horizontal', orientationPortrait: 'portrait', getOrientation(): string { if (!this.isMobile()) { return this.orientationHorizontal; } return Math.abs(window.orientation) === 0? this.orientationPortrait: this.orientationHorizontal; }, };
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.25 |
proxy
|
phpinfo
|
Settings