- Notifications
You must be signed in to change notification settings - Fork26
Comic Book Reader in the Browser
License
codedread/kthoom
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
kthoom is a comic book / ebook reader that runs in the browser using modern web technologies such asJavaScript, HTML5, theFile System Access API, ESModules, Web Workers, Typed Arrays, and more. It can open files and directories from your localfile system, the network, or Google Drive. It can be embedded in larger web apps.
It is built using pure JavaScript with no external dependencies and no JS frameworks. It can runout of the box without any build / compile / transpile / pack step, straight from the browser.Try it here:
OPEN KTHOOM COMIC BOOK READER.
You can also specify a comic book to load via the ?bookUri parameter. Some examples:
- https://codedread.github.io/kthoom/index.html?bookUri=examples/codedread.cbz
- https://codedread.github.io/kthoom/index.html?bookUri=examples/alice-in-wonderland.epub
Or acomic book reading list viathe ?readingListUri parameter.
- .cbz (zip)
- .cbr (rar)
- .cbt (tar)
- .epub (Alpha-level support, a work-in-progress, seeissue list)
- O / D / U: Open books by choosing files/directories from computer or by URL.
- Right/Left: Next/Previous page of book.
- Shift + Right/Left: Last/First page of book.
- [ / ]: Prev / Next book
- H/W: Scale to height/width
- B: Best Fit mode
- R/L: Rotate right/left
- 1/2: Show 1 or 2 pages side-by-side in the viewer.
- 3: Long Strip viewer.
- F: Toggle fullscreen.
- P: Hide metadata viewer and reading stack panel buttons.
- S: Toggle the Reading Stack tray open.
- T: Toggle the Metadata Tag Viewer tray open.
- ?: Bring up Help screen
You can tell kthoom to open as many books as you like in the Choose Files dialog (shift-select allthe books you want to open). Then navigate between books using the square bracket keys or use theReading Stack tray.
NOTE: kthoom loads in local compressed files and decompresses them in the browser, which means thatkthoom has an implementation of unzip, unrar and untar in JavaScript. This code lives in its ownlibrary:BitJS, a more general purpose library to deal withbinary file data in native JavaScript. Kthoom keeps an up-to-date version of bitjs in itsrepository.
kthoom supports loading lists of comic book files at once. Think audio playlists but for comicbooks! SeeJSON Reading Lists formore.
- alwaysOptimizedForStreaming=true: Tells kthoom to render pages immediately as they arede-compressed (this might not work for all comic books as some are not compressed in the orderof reading)
- bookUri=<url>: Tells kthoom to open the given book (cbz/cbr file).
- doNotPromptOnClose=true: Tells kthoom not to ask the user if they are sure they want to close.
- preventUserOpeningBooks=true: Prevents users from opening files in kthoom (useful for hostingkthoom from a web app).
- readingListUri=<url>: Tells kthoom to load the given JSON Reading List (jrl) file and openthe first file in that list.