improved (& still hacky) mobile detection

This commit is contained in:
Bala Clark 2013-12-04 22:35:27 +01:00
parent abe97094e8
commit e1491a7e6f

View file

@ -67,7 +67,7 @@ var ComicBook = (function ($) {
this.isMobile = false; this.isMobile = false;
// mobile enhancements // mobile enhancements
if (navigator.userAgent.match(/mobile/i)) { if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile/i.test(navigator.userAgent)) {
this.isMobile = true; this.isMobile = true;
document.body.classList.add('mobile'); document.body.classList.add('mobile');
defaults.displayMode = 'single'; defaults.displayMode = 'single';