You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
Local PDFs open in VimDF with no setup on Chrome 151+. VimDF now
registers as the browser's handler for application/pdf via the mime_types_handler manifest key, so Chrome hands it the document
directly rather than VimDF having to intercept the request. Where that
path is taken the address bar keeps the document's real URL — local PDFs
now read file:///… instead of viewer.html?file=… — and Chrome passes
on the response it already fetched instead of VimDF issuing a second
request, so single-use URLs and PDFs delivered by POST work too. The
existing redirect rules still fire first for the http(s) URLs they match,
which keeps those on the old viewer.html?file=… form. A new Open PDFs
in VimDF switch on the options page hands PDFs back to Chrome's viewer
without uninstalling
Drop a PDF onto the viewer to open it, or pick one from the prompt.
Reading a file handed over directly needs no permission of any kind, so
this works regardless of Chrome version or file-access setting. The
document keeps its marks, highlights and last page
The options page reports whether local PDFs will actually open, instead
of unconditional prose telling you to tick a box you may not need, with a
button through to the setting when you do
Fixed
Local PDFs silently opened in Chrome's viewer instead of VimDF.
Chromium skips declarativeNetRequest evaluation entirely for file://
requests unless the user has enabled "Allow access to file URLs" — nothing
is logged and the rule still shows up in getDynamicRules(), so the
failure was invisible. That checkbox is off by default for Web Store
installs and on by default for unpacked ones, which is why local PDFs
worked in a development build and not in the published extension. VimDF now
detects the state and explains it, and on Chrome 151+ no longer needs it
A local PDF that couldn't be read left a blank page. pdf.js reports
every file:// failure as MissingPDFException, which VimDF's bot-check
heuristic read as "the server sent an interstitial" and bounced out to
Chrome's viewer without writing a status message — or, on a second attempt
within 30 seconds, blamed a login wall for a file on disk. Local files are
now excluded from that path and get a real explanation plus a file picker
file:// PDFs with a query or fragment were never intercepted. The
local rule anchored $ immediately after .pdf, unlike the http rule, so
a cache-busted livereload URL (paper.pdf?t=…) or a deep link
(paper.pdf#page=3) fell through to Chrome's viewer
Case-insensitive URL matching is now stated explicitly on every redirect
rule rather than relying on a default that changed in Chrome 118
withCredentials is no longer set on the file:// and in-memory load
paths, where it means nothing
Every page load logged two warnings on the extension's error card. Vite
emits <link rel="modulepreload" crossorigin> for shared chunks; on an
extension page Chrome then declines to reuse the preload ("cross-world
extension resource mismatch") and follows up with "preloaded ... but not
used". The hint bought nothing — these modules load from local disk — so it
is no longer emitted