2011-10-19 02:43:43 +09:00
|
|
|
<!doctype html>
|
2012-09-01 07:48:21 +09:00
|
|
|
<!--
|
|
|
|
Copyright 2012 Mozilla Foundation
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
2014-03-30 08:08:02 +09:00
|
|
|
<script src="feature-detect.js"></script>
|
2016-05-23 22:50:07 +09:00
|
|
|
<script src="options/migration.js"></script>
|
2015-03-10 23:22:32 +09:00
|
|
|
<script src="preserve-referer.js"></script>
|
2012-09-06 14:52:17 +09:00
|
|
|
<script src="pdfHandler.js"></script>
|
[CRX] Show nicely formatted URL in omnibox
Before commit:
chrome-extension://EXTENSIONID/content/web/viewer.html?file=http%3A%2F%2Fexample.com%2Ffile.pdf
After commit:
chrome-extension://EXTENSIONID/http://example/file.pdf
Technical details:
- The extension's background page uses the webRequest API to intercept
requests for <extension host>/<real path to pdf>, and redirect it to
the viewer's URL.
- viewer.js uses history.replaceState to rewrite the URL, so that it's
easier for users to recognize and copy-paste URLs.
- The fake paths /http:, /https:, /file:, etc. have been added to the
web_accessible_resources section of the manifest file, in order to
avoid seeing chrome-extension://invalid/ instead of the actual URL
when using history back/forward to navigate from/to the PDF viewer.
- Since the relative path resolving doesn't work because relative URLs
are inaccurate, a <base> tag has been added. This method has already
been proven to work in the Firefox add-on.
Notes:
- This commit has been cherry-picked from crx-using-streams-api.
- Need to merge https://github.com/mozilla/pdf.js/pull/3582 to deal with
a bug in Chrome <=30
- In Chrome, getting the contents of a FTP file is not possible, so
there's no support for FTP files, even though the extension router
recognizes the ftp: scheme.
2013-08-16 05:47:30 +09:00
|
|
|
<script src="extension-router.js"></script>
|
2014-01-26 06:29:33 +09:00
|
|
|
<script src="pdfHandler-vcros.js"></script>
|
2014-08-23 06:00:39 +09:00
|
|
|
<script src="pageAction/background.js"></script>
|
2015-07-20 20:10:51 +09:00
|
|
|
<script src="suppress-update.js"></script>
|