diff options
Diffstat (limited to 'js')
| -rw-r--r-- | js/app.js | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/js/app.js b/js/app.js index a62c459..0e7e4c0 100644 --- a/js/app.js +++ b/js/app.js @@ -172,16 +172,13 @@ class AppClass extends AppCommon { if (this.isOnline()) { - $.post("backend.php", {op: 'getinfo', id: bookId}, function(data) { - - const comment = data.comment ? data.comment : 'No description available'; - - $("#summary-modal .modal-title").html(data.title); - $("#summary-modal .book-summary").html(comment); + const data = await $.post("backend.php", {op: 'getinfo', id: bookId}); + const comment = data.comment ? data.comment : 'No description available'; - $("#summary-modal").modal(); + $("#summary-modal .modal-title").html(data.title); + $("#summary-modal .book-summary").html(comment); - }); + $("#summary-modal").modal(); } else { const data = await localforage.getItem("epube-book." + bookId); |
