about summary refs log tree commit diff stats
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2026-03-22 10:28:56 +0300
committerAndrew Dolgov <fox@fakecake.org>2026-03-22 10:28:56 +0300
commit3df298beca67ae858a09a2c04ca080f4eae1c503 (patch)
tree96a653e9f8a61e8ff322ab6a1b939375c2edcfc7 /js
parentd601fbde54e77e686ac60b898c94055fe96442b6 (diff)
downloadthe-epube-3df298beca67ae858a09a2c04ca080f4eae1c503.tar.gz
the-epube-3df298beca67ae858a09a2c04ca080f4eae1c503.tar.xz
switch summary request to await
Diffstat (limited to 'js')
-rw-r--r--js/app.js13
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);