29c370af27
Test case to exercise the different encodings: 1. Create a file "some file#@%M<br>%25 .pdf" 2. Build the extension with `gulp chromium` and load it in Chrome. 3. Go to `chrome://extensions/` and ensure that the "Allow access to file URLs" is disabled. 4. Try to open the file from step 1 in Chrome (maybe reload once). 5. PDF.js should be showing a file chooser button. 6. Click on that button and select a different file. Test: Check that a confirmation dialog pops up that warns about a different file name. Cancel the dialog. 7. Click on the button again and select the original file. Test: Check that the file opens as expected.
33 lines
1.0 KiB
HTML
33 lines
1.0 KiB
HTML
<div id="chromeFileAccessOverlay" class="container hidden">
|
|
<div class="dialog">
|
|
<div class="row">
|
|
<!-- The extension icon (PDF.js logo) will be shown at the left, to help
|
|
users with recognizing which checkbox they have to click when they
|
|
visit chrome://extensions.
|
|
-->
|
|
<p id="chrome-pdfjs-logo-bg" style="
|
|
display: block;
|
|
padding-left: 60px;
|
|
min-height: 48px;
|
|
background-size: 48px;
|
|
background-repeat: no-repeat;
|
|
font-size: 14px;
|
|
line-height: 1.8em;
|
|
word-break: break-all;">
|
|
Click on
|
|
"<span id="chrome-file-access-label">Allow access to file URLs</span>"
|
|
at
|
|
<a id="chrome-link-to-extensions-page">chrome://extensions</a>
|
|
<br>
|
|
to view <span id="chrome-url-of-local-file">this PDF file.</span>
|
|
</p>
|
|
</div>
|
|
<div class="row">
|
|
<p>
|
|
or select the file again:
|
|
<input type="file" id="chrome-file-fallback" accept=".pdf">
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|