1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 07:08:08 +02:00
pdf.js/web
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
..
images Replace fullscreen with presentationMode 2013-05-01 09:22:17 +03:00
.gitignore Updates webL10n; using viewer.properties as is 2012-11-29 14:02:33 -06:00
compatibility.js Add IE 11 to the text/html data URI shim 2013-06-29 23:43:41 +03:00
compressed.tracemonkey-pldi-09.pdf Add Makefile. Move some files around to make building the website easier. 2011-07-05 10:53:57 -07:00
debugger.js Compatibility with XHTML documents 2013-04-04 12:35:50 +02:00
firefoxcom.js Replace getUserData()/setUserData() with CustomEvents 2013-02-06 23:31:50 +09:00
index.html.template Update web/index.html.template 2012-10-02 07:26:20 -05:00
pdf_find_bar.js pr #3356 2013-06-18 09:05:55 -07:00
pdf_find_controller.js pr #3356 2013-06-18 09:05:55 -07:00
text_layer_builder.js Fixes Text rotation issue #2095 2013-06-30 03:52:30 +05:30
ui_utils.js pr #3356 2013-06-18 09:05:55 -07:00
viewer-snippet-b2g-activity-header.html Add close button and title bar for b2g. 2012-11-28 11:02:56 -08:00
viewer-snippet-firefox-extension.html Un-inline pdf.js for the extension/mozcentral and remove fetch pdf by content code. 2012-10-29 12:44:18 -07:00
viewer-snippet.html Updates webL10n; using viewer.properties as is 2012-11-29 14:02:33 -06:00
viewer.css Hide canvas overflow for high dpi screens. 2013-05-30 08:17:16 -07:00
viewer.html pr #3356 2013-06-18 09:05:55 -07:00
viewer.js Configurable IMAGE_DIR for annotations 2013-07-09 16:24:25 +02:00