pdf.js/web
Jonas Jenwald 09da99b8a0 Introduce a AppOptions abstraction in preparation for a complete refactoring of the way that viewer options are handled
The way that various options are handled in the default viewer is currently a bit of a mess (to say the least). Some viewer options reside in the global `PDFJS` object, while others reside in `Preferences`. To make matters worse, some options even exist in both of the two.

Since the goal, with PDF.js version `2.0`, is to reduce our usage of the global `PDFJS` object, we'll instead want pass in the options when initializing the viewer components and when calling API methods (such as `getDocument`).
However given the current state of things in the default viewer, this wouldn't be exactly easy to implement. Hence this patch, which attempts to consolidate the way that viewer (and later API) options are handled by introducing a `AppOptions` singleton that provides *one* centralized way of interacting with the various options in the default viewer.
2018-03-01 18:11:16 +01:00
..
images Add icons for the new "Select tool" button 2017-05-22 00:51:03 +02:00
.eslintrc Enable the no-var ESLint rule in the /web folder 2017-11-05 16:53:47 +01:00
.gitignore Remove obselete file from .gitignore 2015-01-26 16:44:45 +01:00
annotation_layer_builder.css Remove the background compatibility hacks for linkAnnotation in old versions of IE 2017-12-27 14:16:28 +01:00
annotation_layer_builder.js Move the imageResourcesPath option to a BaseViewer/PDFPageView/AnnotationLayerBuilder option 2018-02-13 14:28:38 +01:00
app_options.js Introduce a AppOptions abstraction in preparation for a complete refactoring of the way that viewer options are handled 2018-03-01 18:11:16 +01:00
app.js Don't block origin-less blob:-URLs in hosted viewer 2018-02-23 12:48:52 +01:00
base_viewer.js Replace the PDFJS.disableWebGL option with a enableWebGL option passed, via BaseViewer/PDFPageView, to PDFPageProxy.render 2018-02-13 16:56:56 +01:00
chrome-i18n-allow-access-to-file-urls.json Add translations of "Allow access to file URLs" 2015-08-14 18:59:55 +02:00
chromecom.js [CRX] Make textLayerMode pref visible and add migration logic 2018-02-22 14:39:58 +01: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 Remove the undocumented PDFJS.enableStats option 2018-02-13 16:56:57 +01:00
default_preferences.json Merge pull request #9479 from Snuffleupagus/refactor-viewer-options 2018-02-14 22:47:33 +01:00
dom_events.js ES6-ify the code in web/dom_events.js 2017-07-29 13:17:22 +02:00
download_manager.js Remove the non-a.click() case from the DownloadManager 2018-02-12 12:50:04 +01:00
firefox_print_service.js Use let/const instead of var in the printing code 2017-10-22 16:13:14 +02:00
firefoxcom.js Pass in the PDFJS.locale option to ExternalServices.createL10n 2018-02-13 16:56:56 +01:00
genericcom.js Pass in the PDFJS.locale option to ExternalServices.createL10n 2018-02-13 16:56:56 +01:00
genericl10n.js Replace var with let in web/genericcom and web/genericl10n 2017-09-10 13:09:26 +02:00
grab_to_pan.js Enable the no-var ESLint rule in the /web folder 2017-11-05 16:53:47 +01:00
interfaces.js Move the imageResourcesPath option to a BaseViewer/PDFPageView/AnnotationLayerBuilder option 2018-02-13 14:28:38 +01:00
overlay_manager.js Convert the overlay manager to ES6 syntax 2017-05-28 21:18:18 +02:00
password_prompt.js Change var to let, and use object destructuring, in a couple of previously class converted web/*.js files 2017-07-03 11:22:49 +02:00
pdf_attachment_viewer.js Attempt to delay disabling of the attachment view until FileAttachment annotations of the *initial* page has been parsed 2017-08-17 14:30:03 +02:00
pdf_cursor_tools.js Remove the enableHandToolOnLoad preference migration code in web/pdf_cursor_tools.js 2017-10-17 18:34:33 +02:00
pdf_document_properties.js Address the final round of review comments for Content-Disposition filename extraction 2018-01-18 17:39:22 +01:00
pdf_find_bar.js Ensure that PDFFindBar._adjustWidth is called in all situations where the width of the findbar might have changed 2017-07-05 11:34:14 +02:00
pdf_find_controller.js Move public methods above private methods in web/pdf_find_controller.js 2018-02-11 20:31:59 +01:00
pdf_history.js Drop third parameter to replaceState/pushState 2018-01-26 13:23:51 +01:00
pdf_link_service.js Move the externalLinkTarget and externalLinkRel options to PDFLinkService options 2018-02-13 14:28:40 +01:00
pdf_outline_viewer.js Move the externalLinkTarget and externalLinkRel options to PDFLinkService options 2018-02-13 14:28:40 +01:00
pdf_page_view.js Replace the PDFJS.disableWebGL option with a enableWebGL option passed, via BaseViewer/PDFPageView, to PDFPageProxy.render 2018-02-13 16:56:56 +01:00
pdf_presentation_mode.js Change var to let, and use object destructuring, in a couple of previously class converted web/*.js files 2017-07-03 11:22:49 +02:00
pdf_print_service.js Enable the mozilla/avoid-removeChild ESLint rule globally 2018-02-10 23:24:50 +01:00
pdf_rendering_queue.js Replace a few occurences of var with let in already ES6 converted web/ files 2017-10-22 16:23:38 +02:00
pdf_sidebar_resizer.js Only resize the sidebar with the left mouse button 2017-12-02 19:05:17 +01:00
pdf_sidebar.js Layout the sidebar in the same vertical position regardless of the viewer width (issue 4052, bug 850591) 2017-10-11 18:17:28 +02:00
pdf_single_page_viewer.js Implement a PDFSinglePageViewer class (issue 8188) 2017-09-23 16:28:04 +02:00
pdf_thumbnail_view.js Refactor PDFThumbnailViewer.scrollThumbnailIntoView to avoid unnecessary DOM look-ups 2018-02-09 14:43:11 +01:00
pdf_thumbnail_viewer.js Refactor PDFThumbnailViewer.scrollThumbnailIntoView to avoid unnecessary DOM look-ups 2018-02-09 14:43:11 +01:00
pdf_viewer.component.js Use ES6 notation, and replace var with let, in web/pdf_viewer.component.js and web/pdfjs.js 2017-11-05 16:53:47 +01:00
pdf_viewer.css Ensure canvas is really hidden when used with pdfjs-dist. 2017-06-20 14:45:07 -05:00
pdf_viewer.js Refactor PDFViewer to extend an abstract BaseViewer class 2017-09-23 16:28:04 +02:00
pdfjs.js Use ES6 notation, and replace var with let, in web/pdf_viewer.component.js and web/pdfjs.js 2017-11-05 16:53:47 +01:00
preferences.js Replace a few occurences of var with let in already ES6 converted web/ files 2017-10-22 16:23:38 +02:00
secondary_toolbar.js Fix inconsistent spacing and trailing commas in objects in web/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on 2017-06-01 12:47:47 +02:00
text_layer_builder.css Use default line height for the text layer 2015-12-02 23:00:12 +01:00
text_layer_builder.js Convert the text layer builder to ES6 syntax 2017-06-29 23:41:25 +02:00
toolbar.js Remove the selectScaleOption helper function, in Toolbar._updateUIState, and simply inline its code instead 2017-06-26 13:06:24 +02:00
ui_utils.js Replace the disableTextLayer and enhanceTextSelection options/preferences with a single textLayerMode option/preference 2018-02-13 16:56:54 +01:00
view_history.js Remove the migration code for old localStorage data in ViewHistory 2017-08-19 11:41:04 +02:00
viewer_compatibility.js Move viewer specific compatibility options from src/shared/compatibility.js and into a separate file 2018-02-13 13:41:59 +01:00
viewer-snippet-chrome-extension.html Wraps mozL10n to async calls; splits firefox and generic l10n libs. 2017-05-31 09:22:25 -05:00
viewer-snippet-chrome-overlays.html Add translations of "Allow access to file URLs" 2015-08-14 18:59:55 +02:00
viewer-snippet-firefox-extension.html Wraps mozL10n to async calls; splits firefox and generic l10n libs. 2017-05-31 09:22:25 -05:00
viewer-snippet-minified.html Remove XHTML leftovers from the viewer HTML files 2016-02-14 13:23:34 +01:00
viewer-snippet.html Wraps mozL10n to async calls; splits firefox and generic l10n libs. 2017-05-31 09:22:25 -05:00
viewer.css Improve visibility of the findInput placeholder in Chrome 2017-12-12 15:34:51 +05:30
viewer.html Remove moznomarginboxes 2018-01-19 22:05:50 +01:00
viewer.js Introduce a AppOptions abstraction in preparation for a complete refactoring of the way that viewer options are handled 2018-03-01 18:11:16 +01:00