John Factotum
357c129b5d
Media Overlay: don't seek in canplaythrough
...
So this is what was causing the `canplaythrough` loop in Chromium and
Firefox.
2024-09-26 12:56:09 +08:00
John Factotum
22189f184e
EPUB: fix media overlay playback
...
For some reason `canplaythrough` is firing more than once
2024-09-26 12:37:06 +08:00
John Factotum
e94b85ce09
FB2: don't throw when image has no xlink:href
...
Fixes #35
2024-09-25 23:15:02 +08:00
John Factotum
dcd4ff403e
Paginator: fix scrolling to collapsed ranges that contain elements
2024-09-25 22:41:20 +08:00
John Factotum
02a24ea25c
Grammar
2024-09-25 22:33:02 +08:00
John Factotum
59a5aa22a0
Paginator: respond to selection change
...
The view follows caret when using caret browsing (F7). Also allows
selecting across pages. And if you click on or select some text and
resize the window, the caret/selection always stays visible.
Some quirks regarding caret browsing:
- In Chromium, in paginated mode, it scrolls when changing selection
(https://issues.chromium.org/issues/40889650 )
- In WebKitGTK, in scrolled mode, the view doesn't follow the caret
(which would be a WebKit bug)
2024-09-24 11:54:47 +08:00
John Factotum
329e22227a
Paginator: fix offset
...
What's `margin` doing here?! It's like this since the first commit, but
it makes no sense... I think I added it incorrectly, being misled by
the getBoundingClientRect bug in Firefox...
2024-09-24 11:36:43 +08:00
John Factotum
59bb647057
Paginator: fix visible range in Firefox
2024-09-24 11:34:57 +08:00
John Factotum
4ef87c2ca7
Paginator: fix caret position when navigating
...
The effect of this is more obvious if you enable caret browsing (F7 in
all browsers). Previously, if you go to a fragment, the caret isn't
moved. Now it works as expected.
2024-09-23 20:33:46 +08:00
John Factotum
b8a0d11910
Paginator: fix changing background in Chromium
2024-09-23 16:48:11 +08:00
Kian-Meng Ang
42ebb0aec4
Fix typos ( #34 )
...
Found via `typos --hidden --format brief`
2024-09-23 08:29:28 +00:00
John Factotum
541bc07b6f
EPUB: redo metadata parsing
...
- Support the `prefix` attribute (for the `property` attr on `<meta>`)
- Localized titles, names (including `sortAs`)
- `belongsTo`, including `calibre:series`
- `altIdentifier`, converted to URN where possible
- Remove `producer`. It's now `contributor` with `role: 'bkp'`.
NOTE: this is a breaking change if you assumed that `title` will always
be a string, `author` will always be an array, etc.
2024-09-18 11:28:08 +08:00
John Factotum
e6937eed15
Paginator: fix focus lost when loading new section
...
Also add method for setting focus on the content window
2024-09-15 13:13:44 +08:00
John Factotum
c17b542b5c
Paginator: needn't fix tabbing in scrolled mode
2024-09-14 23:18:27 +08:00
John Factotum
3b96ddf3e6
Paginator: fix scroll offset when tabbing
2024-09-14 23:14:04 +08:00
John Factotum
b5d0453004
FXL: ignore linear & default to odd pages right
...
This matches the behavior of other reading systems. See
https://github.com/johnfactotum/foliate/issues/1318#issuecomment-2349375230
2024-09-14 01:21:54 +08:00
John Factotum
327031aca1
Paginator: add scroll event
...
Unlike `relocate`, which is debounced, a scroll event is useful when you
want to do stuff as soon as it scrolls.
2024-09-12 05:30:58 +08:00
John Factotum
3658b19a86
Quote Image: fix overflow
...
Note: simply setting `display: none` works in Firefox, but not in WebKit
Chromium.
2024-09-12 05:25:42 +08:00
John Factotum
0b9fac8ff3
Add module for generating quote images
2024-09-11 14:12:27 +08:00
John Factotum
ffceb8a4aa
Reader: update vendored libraries
...
Note: these are built from running `npm run build` from the main repo
https://github.com/johnfactotum/foliate
2024-09-11 13:50:39 +08:00
John Factotum
9ff893f3e7
Treat XHTML without xmlns as HTML
...
The XHTML 1.1 spec says
The start tag of the root element of the document MUST explicitly
contain an xmlns declaration for the XHTML namespace
There doesn't seem to be such a requirement in the WHATWG spec. But at
any rate browsers won't render it properly without the XHTML namespace.
2024-07-27 09:46:04 +08:00
Balki
835b70a840
Reader: allow book urls to be relative ( #29 )
2024-07-26 14:00:54 +00:00
John Factotum
660f6bbf1e
KF8: fix contributor not exposed in metadata
2024-07-15 00:11:25 +08:00
John Factotum
5cda2125d8
MOBI6: empty string instead of undefined in TOC
...
Should fix https://github.com/johnfactotum/foliate/issues/1347
2024-07-15 00:08:50 +08:00
John Factotum
92964699af
Paginator: make grid columns follow text block
...
This is a purely internal change, but it might make things easier in the
future if one wants to place stuff on the margins (e.g. to fade the edge
of the iframe when animating, or place prev/next buttons on the sides)
2024-06-22 18:34:19 +08:00
John Factotum
51c02bf594
EPUB: support display-options.xml
2024-06-22 01:42:47 +08:00
John Factotum
37626ba44a
PDF: default to odd pages right
2024-06-22 01:40:58 +08:00
Pablo C. Vergara Castro and pvergara
239af2437a
Close the "not" function ( #25 )
...
Co-authored-by: pvergara <ecos.logic.org@gmail.com >
2024-06-03 05:54:44 +00:00
John Factotum
8c378d68fc
README: fix warning formatting
...
Also add link to https://github.com/johnfactotum/epub-test
2024-05-17 05:10:55 +00:00
John Factotum
7372c658cf
Fix package.json
2024-04-27 16:51:04 +08:00
John Factotum
b7ff640943
Paginator: prevent spread in portrait
...
Or, for vertical writing, in landscape
2024-04-27 16:14:36 +08:00
Vytor Rennan
28a757e5bb
Fix bad resolution for pdfs ( #23 )
2024-04-26 03:52:21 +00:00
John Factotum
5600b6c0dc
Migrate to ESLint 9 and fix linting issues
2024-04-23 12:59:31 +08:00
John Factotum
04b8789267
Footnotes: reject when failing to show footnote
...
Now `handle()` could return either undefined or a promise, which you can
catch to handle the case where footnote fails to show.
Also improve footnote extraction.
2024-03-26 16:41:30 +08:00
John Factotum
b45e08b10b
Paginator: fix unnecessary wrapping in tables
...
Fixes https://github.com/johnfactotum/foliate/issues/1278
2024-03-25 05:52:49 +08:00
John Factotum
b0d7ed481f
Paginator: destroy view before removing it
2024-03-23 12:12:39 +08:00
John Factotum
18159a4d07
Don't check document's existence when expanding
...
`expand()` is only called after `render()`, which assumes that it exists
2024-03-21 20:22:31 +08:00
John Factotum
b0a869b7ed
Fix page end cut off when starting with page break
...
Fixes https://github.com/johnfactotum/foliate/issues/1179
2024-03-20 08:44:47 +08:00
John Factotum
d9da576611
CBZ: add support for AVIF
...
Also throw when there are no images to show
2024-01-20 12:09:02 +08:00
John Factotum
35f749dd7c
CBZ: add JPEG XL support
2023-12-30 12:21:08 +08:00
John Factotum
1ff2d530c4
Add support for dictd and StarDict dictionaries
2023-12-16 15:04:43 +08:00
John Factotum
ad5ec4d0e9
Add OPDS
2023-12-16 14:45:05 +08:00
John Factotum
7d55731faf
Footnotes: include links with <length> or <percentage> vertical-align
2023-12-04 03:50:15 +08:00
John Factotum
449842fd0a
Fix argument
2023-12-04 03:48:41 +08:00
John Factotum
cbe9e0009c
Make animation setting an attribute instead of a property
2023-11-28 11:07:56 +08:00
John Factotum
2ea63929c7
Fix broken layout when book has !important styles
2023-11-15 04:33:02 +08:00
John Factotum
f75fbba096
Foonotes: get note type
...
Also rename footnote.js -> footnotes.js
2023-11-12 21:42:21 +08:00
John Factotum
9e80194ba3
Add footnote handler
2023-11-05 23:09:44 +08:00
John Factotum
2a6012d749
Move section marks calculation to view
...
Also try to fix section mark epsilon
2023-11-02 16:10:40 +08:00
John Factotum
7dcbc6921a
Update vendored libraries
2023-11-02 12:26:38 +08:00