| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" | |
| content="initial-scale=1, minimum-scale=1, width=device-width"> | |
| <script> | |
| // If this page is embedded in a WebViewPlugin, the 'window.plugin' | |
| // object is externally defined, and we trigger the download that way. | |
| if (window.plugin !== undefined) { | |
| window.addEventListener('DOMContentLoaded', function () { | |
| let button = document.getElementById('open-button'); | |
| button.addEventListener('click', function(e) { | |
| window.plugin.openPDF(); | |
| e.preventDefault(); | |
| }); | |
| if (plugin.notifyPlaceholderReadyForTesting) | |
| plugin.notifyPlaceholderReadyForTesting(); | |
| }); | |
| } | |
| window.onkeydown = function(e) { | |
| if (e.key == 'Enter' || e.key == ' ') { | |
| document.getElementById('open-button').click(); | |
| e.preventDefault(); | |
| } | |
| }; | |
| </script> | |
| <link rel="stylesheet" href="../../../../components/security_interstitials/core/common/resources/interstitial_core.css"> | |
| <link rel="stylesheet" href="../../../../components/security_interstitials/core/common/resources/interstitial_common.css"> | |
| <link rel="stylesheet" href="../../../../components/security_interstitials/core/browser/resources/interstitial_webview_quiet.css"> | |
| <style> | |
| path { | |
| fill-opacity: 0.2; | |
| } | |
| .icon { | |
| background-image: none; | |
| } | |
| #open-button { | |
| background: var(--primary-button-fill-color); | |
| border: 0; | |
| border-radius: 20px; | |
| box-sizing: border-box; | |
| color: var(--primary-button-text-color); | |
| cursor: pointer; | |
| display: inline-block; | |
| font-size: .875em; | |
| margin: 0; | |
| padding: 8px 16px; | |
| text-decoration: none; | |
| transition: box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1); | |
| user-select: none; | |
| } | |
| #open-button:active { | |
| background: var(--primary-button-fill-color-active); | |
| outline: 0; | |
| } | |
| @media (max-width: 420px) { | |
| #open-button { | |
| font-size: .825em; | |
| font-weight: 500; | |
| padding: 16px 24px; | |
| width: 100%; | |
| } | |
| } | |
| @media (max-width: 420px) and (orientation: portrait), | |
| (max-height: 560px) { | |
| #open-button { | |
| font-size: .933em; | |
| margin: 6px 0; | |
| } | |
| } | |
| </style> | |
| </head> | |
| <body class="pdf"> | |
| <div class="interstitial-wrapper"> | |
| <div id="main-content"> | |
| <div class="icon"> | |
| <!-- Material Design PDF icon --> | |
| <svg viewBox="0 0 24 24"> | |
| <path d="M7 11.5h1v-1H7v1zM19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-9.5 8.5c0 .83-.67 1.5-1.5 1.5H7v2H5.5V9H8c.83 0 1.5.67 1.5 1.5v1zm10-1H17v1h1.5V13H17v2h-1.5V9h4v1.5zm-5 3c0 .83-.67 1.5-1.5 1.5h-2.5V9H13c.83 0 1.5.67 1.5 1.5v3zm-2.5 0h1v-3h-1v3z"></path> | |
| </svg> | |
| </div> | |
| <div id="main-message"> | |
| <h1>$i18n{fileName}</h1> | |
| </div> | |
| <!-- This control used to be a <button> nested inside an <a>, so it was | |
| exposed to assistive technology as a button. It is an anchor now, | |
| and since this element navigates to the PDF (except in the | |
| WebViewPlugin case, where script cancels the navigation and calls | |
| openPDF() instead), the implicit `link` role would arguably | |
| describe it better. `role="button"` is kept only to preserve the | |
| old behavior. --> | |
| <a id="open-button" role="button" href="$i18n{pdfUrl}" target="_blank" | |
| tabindex="1">$i18n{open}</a> | |
| </div> | |
| </div> | |
| </body> | |
| </html> |