diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2026-03-22 10:28:56 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2026-03-22 10:28:56 +0300 |
| commit | 3df298beca67ae858a09a2c04ca080f4eae1c503 (patch) | |
| tree | 96a653e9f8a61e8ff322ab6a1b939375c2edcfc7 /js | |
| parent | d601fbde54e77e686ac60b898c94055fe96442b6 (diff) | |
| download | the-epube-3df298beca67ae858a09a2c04ca080f4eae1c503.tar.gz the-epube-3df298beca67ae858a09a2c04ca080f4eae1c503.tar.xz | |
switch summary request to await
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); |
