Commit Graph

15 Commits

Author SHA1 Message Date
Rob Wu
cc04cf5d1f Configurable IMAGE_DIR for annotations
The Chrome extension activates PDF.js by inserting the script tags
in a document whose URL and location origin is identical to the PDF
file.
Because of this, the path './images/' was resolved relatively to the
location of the PDF file instead of the extension.

To fix this, the IMAGE_DIR constant is moved outside the local scope,
to allow extensions/chrome/insertviewer.js to override the value.

Originally, the IMAGE_DIR variable was a global variable, but commit
f8f4b3f45d moved the global variable
to the local scope, causing the extension to malfunction.

Impact: low, the only consequence is that some rarely used images
were not visible.

Trivial test:
At the center of page 2, the annotation icon
(images/annotation-comment.svg) should be visible:
http://linorg.usp.br/CTAN/macros/latex/contrib/pdfcomment/doc/pdfcomment.pdf
2013-07-09 16:24:25 +02:00
Yury Delendik
3461d02d05 Enforces trailing spaces 2013-07-01 11:25:46 -05:00
Rob Wu
57e6238a6e Enable Web Worker again in Chrome extension
Previously, Web Workers were not created because of a security
policy which does not respect relaxed privileges.
2013-04-04 13:40:35 +02:00
Rob Wu
e181a3c902 Highly improved Chrome extension
Full list feature changes in this commit:
- Support for iframes
- Switched to content-type (MIME) detection instead of hard-coding a
  case-sensitive check for the .PDF extension
- The PDF's original URL is visible in the omnibox
- Support for incognito mode

Note: PDF viewer is disabled for the file:// + incognito
combination, because it's currently impossible to get the combination
to work.

See https://github.com/mozilla/pdf.js/pull/3017#issuecomment-15693432
2013-04-04 10:04:13 +02:00
Aluísio Augusto Silva Gonçalves
d18f8d11bc Add icons to the Chrome extensions 2013-02-16 23:15:01 -03:00
Yury Delendik
fcc169453b Adds the extensions/* files for jshint 2013-02-02 21:15:43 -06:00
Michael Payne
05bca47b11 Include uppercase extensions for Chrome
add uppercase case extension recognition for Chrome pdf.js
2012-10-17 21:37:24 -07:00
Michael Payne
6ca9245a39 Changes to allowed versioned building of Chrome extension that meets new
Chrome extension security requirements
2012-09-06 12:39:49 -07:00
Michael Payne
088c6e17e8 changes to allow chrome extension to load
changes to remove inline scripts, update manifest version, fix make.js
so compatibility.js isn't included for chrome. Due to new Chrome
extension changes outlined at
http://developer.chrome.com/extensions/manifestVersion.html
2012-09-05 22:52:17 -07:00
Brendan Dahl
332ae4ce41 Change to the Apache v2 license. 2012-08-31 15:48:21 -07:00
Yury Delendik
6323c8e084 Loading extension resources via stringbundle 2012-05-11 14:39:11 -05:00
notmasteryet
0c7d45bbfb Chrome extension: uses encodeURIComponent; fixes download button 2012-03-03 19:27:35 -06:00
Lucas Stadler
913faac2e4 Make chrome extensions compatible with latest API changes.
That is, webRequest is no longer experimental and so it's easier
to start (without --enable-experimental-extension-apis).
2012-02-13 20:28:25 +01:00
Vivien Nicolas
6e10114647 Add content/ to the viewer.html path 2011-11-07 16:01:50 +01:00
Vivien Nicolas
08af0c7686 Initial Chrome extension import 2011-10-18 19:43:43 +02:00