Projektmanagement-Game/Webservice/mobileHandler.js

12 lines
345 B
JavaScript
Raw Normal View History

function isMobile() {
2021-06-11 05:55:46 +00:00
let mobileDeviceIndicator = 0;
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
mobileDeviceIndicator = 1;
}
/*
2021-06-11 05:55:46 +00:00
let hasTouchscreen = 'ontouchstart' in window;
alert(hasTouchscreen ? 'has touchscreen' : 'doesn\'t have touchscreen');
*/
}