diff --git a/files_reader/templates/cbreader.php b/files_reader/templates/cbreader.php
index 24bac88..6e47a48 100644
--- a/files_reader/templates/cbreader.php
+++ b/files_reader/templates/cbreader.php
@@ -36,9 +36,9 @@
-
-
-
+
+
+
@@ -109,7 +109,9 @@
-
+
+
+
diff --git a/files_reader/templates/epubreader.php b/files_reader/templates/epubreader.php
index 8f2a9dc..da6ca87 100644
--- a/files_reader/templates/epubreader.php
+++ b/files_reader/templates/epubreader.php
@@ -36,7 +36,7 @@
-
+
@@ -155,7 +155,7 @@
-
+
diff --git a/files_reader/templates/pdfreader.php b/files_reader/templates/pdfreader.php
index 7513ce4..a47410e 100644
--- a/files_reader/templates/pdfreader.php
+++ b/files_reader/templates/pdfreader.php
@@ -36,7 +36,7 @@
-
+
@@ -113,7 +113,7 @@
-
+
diff --git a/files_reader/vendor/cbrjs/cbr.js b/files_reader/vendor/cbrjs/cbr.js
index 503f2fa..077369c 100644
--- a/files_reader/vendor/cbrjs/cbr.js
+++ b/files_reader/vendor/cbrjs/cbr.js
@@ -50,7 +50,7 @@ CBRJS.Reader = function(bookPath, _options) {
}
xhr.open('GET',url, true);
-
+
options.start(filename);
xhr.responseType = "arraybuffer";
@@ -70,10 +70,10 @@ CBRJS.Reader = function(bookPath, _options) {
reader.options.session.size = e.total;
};
- xhr.onload = function () {
+ xhr.onload = function () {
if ((this.status === 200) && this.response) {
var done = false;
- var ua = new bitjs.archive[archive_class](this.response, 'vendor/bitjs/');
+ var ua = new bitjs.archive[archive_class](this.response, document.head.dataset.basepath + 'vendor/bitjs/');
ua.addEventListener(bitjs.archive.UnarchiveEvent.Type.START, function (e) {
$progressbar.css('width', '0%');
@@ -120,9 +120,9 @@ CBRJS.Reader = function(bookPath, _options) {
$('.icon-unarchive').removeClass('active');
$('.icon-unarchive').addClass('error');
$('#message').text('Failed to extract images from archive, file corrupted?');
-
+
});
- }
+ }
ua.start();
};
@@ -261,7 +261,7 @@ ComicBook = (function ($) {
thumbnails: true, // true / false (use thumbnails in index)
thumbnailWidth: 200, // width of thumbnail
sidebarWide: false, // use wide sidbar
- currentPage: 0, // current page
+ currentPage: 0, // current page
keyboard: {
32: 'next', // space
34: 'next', // page-down
@@ -276,7 +276,7 @@ ComicBook = (function ($) {
70: 'toggleFullscreen', // f
27: 'closeSidebar' // esc
},
- vendorPath: 'vendor/',
+ vendorPath: document.head.dataset.basepath + 'vendor/',
forward_buffer: 3,
session: {
getCursor: function() {},
@@ -442,7 +442,7 @@ ComicBook = (function ($) {
break;
default:
console.log("unknown enhancement: " + JSON.stringify(prop));
- }
+ }
}
};
@@ -570,7 +570,7 @@ ComicBook = (function ($) {
};
/**
- * Insert thumbnail into TOC
+ * Insert thumbnail into TOC
*/
ComicBook.prototype.tocInsert = function (image, page, replace) {
var placeholder = toc.children[page].firstChild;
@@ -578,7 +578,7 @@ ComicBook = (function ($) {
placeholder.parentNode.replaceChild(
self.getThumb(image),
placeholder
- );
+ );
}
toc.children[page].addEventListener('click', function (e) {
@@ -1407,7 +1407,7 @@ ComicBook = (function ($) {
page = options.currentPage;
}
- document.getElementById('toc').parentNode.scrollTop =
+ document.getElementById('toc').parentNode.scrollTop =
document.getElementById('page-' + String(page + 1)).offsetTop
- Math.floor($('.panels').height() * 1.5);
};
@@ -1474,5 +1474,3 @@ ComicBook = (function ($) {
}
})(window, jQuery);
-
-
diff --git a/files_reader/vendor/cbrjs/css/cbr.css b/files_reader/vendor/cbrjs/css/cbr.css
index ffdbfd1..00d3164 100644
--- a/files_reader/vendor/cbrjs/css/cbr.css
+++ b/files_reader/vendor/cbrjs/css/cbr.css
@@ -116,7 +116,13 @@ body:not(.mobile) .navigate:hover {
#cbr-loading-overlay {
z-index: 100;
- background: #000 url("img/loading.gif") no-repeat center;
+ padding: 0;
+ width: 20px;
+ height: 20px;
+}
+
+#cbr-loading-overlay > img {
+ width: 100%;
}
.overlay {