FB2 footnotes: handle them just as other footnotes

- FB2 footnotes are no more rendered in-page by default
- In-page rendering can be enable by the added Style tweak
- FB2 footnotes can also show in footnote popup (with
  some added not-so-nice CSS so MuPDF can render them
  as crengine)
This commit is contained in:
poire-z
2020-02-27 12:12:53 +01:00
parent 2cbce841c5
commit a5232594d9
3 changed files with 37 additions and 4 deletions

View File

@@ -1000,13 +1000,15 @@ function ReaderLink:showAsFootnotePopup(link, neglect_current_location)
-- if not trusted, checks marked (*) don't apply
flags = flags + 0x0002
end
-- Checks for private CSS properties "-cr-hint: footnote/noteref/..." are
-- always done (they can be applied to specific elements or classe names
-- with Styles tweaks.)
-- Trust role= and epub:type= attribute values if defined, for source(*) and target
-- (If needed, we could add a check for a private CSS property "-cr-hint: footnote"
-- or "-cr-hint: noteref", so one can define it to specific classes with Styles
-- tweaks.)
flags = flags + 0x0004
-- flags = flags + 0x0008 -- Unused yet
-- Accept classic FB2 footnotes: body[name="notes" or "comments"] > section
flags = flags + 0x0008
-- TARGET STATUS AND SOURCE RELATION
-- Target must have an anchor #id (ie: must not be a simple link to a html file)