mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[UX] Links menu and handling tweaks (#4867)
- Removed "Swipe to follow first link on page" menu item and handling code, as it feels not really as practical as "Swipe to follow nearest link". - Removed recently added "External link action", as we can just always present a popup with the url and the available actions. - Generic handling of these actions in onGoToExternalLink(), so they are proposed on the Wikipedia lookup popup too. - Allow external link on PDF documents (previously, only internal links were handled). - Have "Ignore external links on tap" available on all document types. - Added "Ignore external links on swipe" (default to true, the current behaviour). - Added multiswipe gesture "Follow nearest internal link" (the existing "Follow nearest link" now follows the nearest external or internal link) - ButtonDialogTitle: added an option to look a bit more alike ConfirmBoxes. - Footnote popups: fix link unhighlight when tap on external link.
This commit is contained in:
@@ -948,7 +948,8 @@ function KoptInterface:getLinkFromPosition(doc, pageno, pos)
|
||||
w = link.x1 - link.x0 + len,
|
||||
h = link.y1 - link.y0 + len,
|
||||
}
|
||||
if _inside_box(pos, lbox) and link.page then
|
||||
-- Allow external links, with link.uri instead of link.page
|
||||
if _inside_box(pos, lbox) then -- and link.page then
|
||||
return link, lbox
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user