mobile defaults to single page view
This commit is contained in:
parent
f5841f6995
commit
b677d1ba76
1 changed files with 8 additions and 4 deletions
|
@ -89,6 +89,14 @@ var ComicBook = (function ($) {
|
||||||
libPath: '/lib/'
|
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 options = merge(defaults, opts); // options array for internal use
|
||||||
|
|
||||||
var no_pages = srcs.length;
|
var no_pages = srcs.length;
|
||||||
|
@ -102,10 +110,6 @@ var ComicBook = (function ($) {
|
||||||
var page_requested = false; // used to request non preloaded pages
|
var page_requested = false; // used to request non preloaded pages
|
||||||
var shiv = false;
|
var shiv = false;
|
||||||
|
|
||||||
if (navigator.userAgent.match(/mobile/i)) {
|
|
||||||
document.body.classList.add('mobile');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the window.innerWidth - scrollbars
|
* Gets the window.innerWidth - scrollbars
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue