pdf.js/extensions/chrome
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
..
.gitignore Loading extension resources via stringbundle 2012-05-11 14:39:11 -05:00
hide-xhtml-error.css Highly improved Chrome extension 2013-04-04 10:04:13 +02:00
icon16.png Add icons to the Chrome extensions 2013-02-16 23:15:01 -03:00
icon48.png Add icons to the Chrome extensions 2013-02-16 23:15:01 -03:00
icon128.png Add icons to the Chrome extensions 2013-02-16 23:15:01 -03:00
insertviewer.js Configurable IMAGE_DIR for annotations 2013-07-09 16:24:25 +02:00
manifest.json Enable Web Worker again in Chrome extension 2013-04-04 13:40:35 +02:00
patch-worker.js Enable Web Worker again in Chrome extension 2013-04-04 13:40:35 +02:00
pdfHandler-local.js Enforces trailing spaces 2013-07-01 11:25:46 -05:00
pdfHandler.html Highly improved Chrome extension 2013-04-04 10:04:13 +02:00
pdfHandler.js Highly improved Chrome extension 2013-04-04 10:04:13 +02:00