pdf.js/web/viewer-snippet-chrome-overlays.html
Jonas Jenwald f0aa08b464 Convert the existing overlays to use <dialog> elements (issue 14698)
This replaces our *custom* overlays with standard `<dialog>` DOM elements, see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog, thus simplifying the related CSS, HTML, and JavaScript code.

With these changes, some of the functionality of the `OverlayManager` class is now handled natively (e.g. `Esc` to close the dialog). However, since we still need to be able to prevent dialogs from overlaying one another, it still makes sense to keep this functionality (as far as I'm concerned).
2022-03-28 11:36:29 +02:00

31 lines
953 B
HTML

<dialog id="chromeFileAccessDialog">
<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>
</dialog>