mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
Added basic pagination
This commit is contained in:
parent
1a89a9c3ff
commit
816880d328
12 changed files with 1289 additions and 373 deletions
|
@ -304,4 +304,33 @@ EPUBJS.core.documentHeight = function() {
|
|||
|
||||
EPUBJS.core.isNumber = function(n) {
|
||||
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||
}
|
||||
};
|
||||
|
||||
EPUBJS.core.prefixed = function(unprefixed) {
|
||||
var vendors = ["Webkit", "Moz", "O", "ms" ],
|
||||
prefixes = ['-Webkit-', '-moz-', '-o-', '-ms-'],
|
||||
upper = unprefixed[0].toUpperCase() + unprefixed.slice(1),
|
||||
length = vendors.length;
|
||||
|
||||
if (typeof(document.body.style[unprefixed]) != 'undefined') {
|
||||
return unprefixed;
|
||||
}
|
||||
|
||||
for ( var i=0; i < length; i++ ) {
|
||||
if (typeof(document.body.style[vendors[i] + upper]) != 'undefined') {
|
||||
return vendors[i] + upper;
|
||||
}
|
||||
}
|
||||
|
||||
return unprefixed;
|
||||
};
|
||||
|
||||
EPUBJS.core.defaults = function(obj) {
|
||||
for (var i = 1, length = arguments.length; i < length; i++) {
|
||||
var source = arguments[i];
|
||||
for (var prop in source) {
|
||||
if (obj[prop] === void 0) obj[prop] = source[prop];
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue