salix/front/core/lib/is-mobile.js

5 lines
150 B
JavaScript
Raw Permalink Normal View History

const regex = /Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i;
const isMobile = regex.test(navigator.userAgent);
export default isMobile;