diff options
Diffstat (limited to 'js/reader.js')
-rw-r--r-- | js/reader.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/js/reader.js b/js/reader.js index 0cb1410..047ad1a 100644 --- a/js/reader.js +++ b/js/reader.js @@ -10,6 +10,19 @@ const MIN_LENGTH_TO_JUSTIFY = 32; /* characters */ const LOCATION_DIVISOR = 10; const PAGE_RESET_PROGRESS = -1; +Promise.allSettled = Promise.allSettled || ((promises) => Promise.all( + promises.map((p) => p + .then((value) => ({ + status: "fulfilled", + value + })) + .catch((reason) => ({ + status: "rejected", + reason + })) + ) +)); + const Reader = { csrf_token: "", last_stored_cfi: "", |