diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-21 11:48:07 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-21 11:48:07 +0200 |
commit | 0b2b40a233c014e684f6efed0298efda02e7abf4 (patch) | |
tree | a1bc3a095b57279cd27b5ef65498b7c9a0fcf457 /src/gmdocument.c | |
parent | c651680715f7549a0cdbdbb10d535cba2272d9d0 (diff) |
Added option to load image instead of scrolling
One can now read through a page and load all inline images simply by repeatedly pressing Space or cursor down.
Key repeat events do not trigger image loads.
Diffstat (limited to 'src/gmdocument.c')
-rw-r--r-- | src/gmdocument.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c index 923c20c9..62a0ba55 100644 --- a/src/gmdocument.c +++ b/src/gmdocument.c | |||
@@ -1366,8 +1366,14 @@ enum iColorId linkColor_GmDocument(const iGmDocument *d, iGmLinkId linkId, enum | |||
1366 | } | 1366 | } |
1367 | 1367 | ||
1368 | iBool isMediaLink_GmDocument(const iGmDocument *d, iGmLinkId linkId) { | 1368 | iBool isMediaLink_GmDocument(const iGmDocument *d, iGmLinkId linkId) { |
1369 | return (linkFlags_GmDocument(d, linkId) & | 1369 | const iString *dstUrl = absoluteUrl_String(&d->url, linkUrl_GmDocument(d, linkId)); |
1370 | (imageFileExtension_GmLinkFlag | audioFileExtension_GmLinkFlag)) != 0; | 1370 | const iRangecc scheme = urlScheme_String(dstUrl); |
1371 | if (equalCase_Rangecc(scheme, "gemini") || equalCase_Rangecc(scheme, "gopher") || | ||
1372 | willUseProxy_App(scheme)) { | ||
1373 | return (linkFlags_GmDocument(d, linkId) & | ||
1374 | (imageFileExtension_GmLinkFlag | audioFileExtension_GmLinkFlag)) != 0; | ||
1375 | } | ||
1376 | return iFalse; | ||
1371 | } | 1377 | } |
1372 | 1378 | ||
1373 | const iString *title_GmDocument(const iGmDocument *d) { | 1379 | const iString *title_GmDocument(const iGmDocument *d) { |