Skip to content
Snippets Groups Projects
Unverified Commit 22c48421 authored by tamaina's avatar tamaina Committed by Satsuki Yanagi
Browse files
parent 788edd36
No related branches found
No related tags found
No related merge requests found
......@@ -84,9 +84,14 @@
// Detect the user agent
const ua = navigator.userAgent.toLowerCase();
const isMobile = settings.device.appTypeForce === 'mobile' ||
(settings.device.appTypeForce !== 'desktop'
&& (/mobile|iphone|ipad|android/.test(ua) || window.innerWidth < 576));
let isMobile = /mobile|iphone|ipad|android/.test(ua) || window.innerWidth < 576
if (settings && settings.device.appTypeForce) {
if (settings.device.appTypeForce === 'mobile') {
isMobile = true
} else if (settings.device.appTypeForce === 'desktop') {
isMobile = false
}
}
// Get the <head> element
const head = document.getElementsByTagName('head')[0];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment