Update ebook.js

code review