mobile defaults to single page view

This commit is contained in:
Bala Clark 2013-08-18 19:36:57 +02:00
parent f5841f6995
commit b677d1ba76

View file

@ -89,6 +89,14 @@ var ComicBook = (function ($) {
libPath: '/lib/'
};
this.isMobile = false;
if (navigator.userAgent.match(/mobile/i)) {
this.isMobile = true;
document.body.classList.add('mobile');
defaults.displayMode = 'single';
}
var options = merge(defaults, opts); // options array for internal use
var no_pages = srcs.length;
@ -102,10 +110,6 @@ var ComicBook = (function ($) {
var page_requested = false; // used to request non preloaded pages
var shiv = false;
if (navigator.userAgent.match(/mobile/i)) {
document.body.classList.add('mobile');
}
/**
* Gets the window.innerWidth - scrollbars
*/