X-Git-Url: https://git.mdrn.pl/ReadingsJQM.git/blobdiff_plain/c956fba7332f45e9abab07b2b8ac417b0f6514c8..ec887e1b76ec0d40861e67937026cc4b1d47f112:/js/app/reader.coffee?ds=sidebyside diff --git a/js/app/reader.coffee b/js/app/reader.coffee index d106ac1..21105d0 100644 --- a/js/app/reader.coffee +++ b/js/app/reader.coffee @@ -1,6 +1,10 @@ +$.fn.Readings.reader = (opts) -> + this.each -> + Readings.catalogue.fetchBook opts.book_id, true, (book) => + $(this).find("#content-reader").empty().append(book.getText()) + -$.fn.extend load_book: (slug) -> this.each -> $.ajax