Removes app.js dependency on mozPrintCallback_polyfill.js.
This commit is contained in:
parent
3b21b51716
commit
3132941948
5
make.js
5
make.js
@ -129,7 +129,7 @@ target.generic = function() {
|
||||
|
||||
var TMP_VIEWER = GENERIC_DIR + '/web/viewer.js.tmp';
|
||||
cd('web/');
|
||||
var viewerBundleFiles = ['app.js'];
|
||||
var viewerBundleFiles = ['app.js', 'mozPrintCallback_polyfill.js'];
|
||||
bundle('viewer.js', ROOT_DIR + TMP_VIEWER, viewerBundleFiles,
|
||||
'pdfjs-dist/web/viewer', defines, true);
|
||||
cd(ROOT_DIR);
|
||||
@ -1132,7 +1132,8 @@ target.chromium = function() {
|
||||
|
||||
var TMP_VIEWER = CHROME_BUILD_CONTENT_DIR + '/web/viewer.js.tmp';
|
||||
cd('web/');
|
||||
var viewerBundleFiles = ['app.js', 'chromecom.js'];
|
||||
var viewerBundleFiles = ['app.js', 'chromecom.js',
|
||||
'mozPrintCallback_polyfill.js'];
|
||||
bundle('viewer.js', ROOT_DIR + TMP_VIEWER, viewerBundleFiles,
|
||||
'pdfjs-dist/web/viewer', defines, true);
|
||||
cd(ROOT_DIR);
|
||||
|
10
web/app.js
10
web/app.js
@ -28,8 +28,7 @@
|
||||
'pdfjs-web/pdf_rendering_queue', 'pdfjs-web/pdf_link_service',
|
||||
'pdfjs-web/pdf_outline_viewer', 'pdfjs-web/overlay_manager',
|
||||
'pdfjs-web/pdf_attachment_viewer', 'pdfjs-web/pdf_find_controller',
|
||||
'pdfjs-web/pdf_find_bar', 'pdfjs-web/mozPrintCallback_polyfill',
|
||||
'pdfjs-web/pdfjs'],
|
||||
'pdfjs-web/pdf_find_bar', 'pdfjs-web/pdfjs'],
|
||||
factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('./ui_utils.js'), require('./download_manager.js'),
|
||||
@ -42,7 +41,7 @@
|
||||
require('./pdf_link_service.js'), require('./pdf_outline_viewer.js'),
|
||||
require('./overlay_manager.js'), require('./pdf_attachment_viewer.js'),
|
||||
require('./pdf_find_controller.js'), require('./pdf_find_bar.js'),
|
||||
require('./mozPrintCallback_polyfill.js'), require('./pdfjs.js'));
|
||||
require('./pdfjs.js'));
|
||||
} else {
|
||||
factory((root.pdfjsWebApp = {}), root.pdfjsWebUIUtils,
|
||||
root.pdfjsWebDownloadManager, root.pdfjsWebPDFHistory,
|
||||
@ -54,8 +53,7 @@
|
||||
root.pdfjsWebPDFRenderingQueue, root.pdfjsWebPDFLinkService,
|
||||
root.pdfjsWebPDFOutlineViewer, root.pdfjsWebOverlayManager,
|
||||
root.pdfjsWebPDFAttachmentViewer, root.pdfjsWebPDFFindController,
|
||||
root.pdfjsWebPDFFindBar, root.pdfjsWebMozPrintCallbackPolyfill,
|
||||
root.pdfjsWebPDFJS);
|
||||
root.pdfjsWebPDFFindBar, root.pdfjsWebPDFJS);
|
||||
}
|
||||
}(this, function (exports, uiUtilsLib, downloadManagerLib, pdfHistoryLib,
|
||||
preferencesLib, pdfSidebarLib, viewHistoryLib,
|
||||
@ -64,7 +62,7 @@
|
||||
pdfViewerLib, pdfRenderingQueueLib, pdfLinkServiceLib,
|
||||
pdfOutlineViewerLib, overlayManagerLib,
|
||||
pdfAttachmentViewerLib, pdfFindControllerLib, pdfFindBarLib,
|
||||
mozPrintCallbackPolyfillLib, pdfjsLib) {
|
||||
pdfjsLib) {
|
||||
|
||||
var UNKNOWN_SCALE = uiUtilsLib.UNKNOWN_SCALE;
|
||||
var DEFAULT_SCALE_VALUE = uiUtilsLib.DEFAULT_SCALE_VALUE;
|
||||
|
@ -166,7 +166,7 @@ function webViewerLoad() {
|
||||
var config = getViewerConfiguration();
|
||||
//#if !PRODUCTION
|
||||
require.config({paths: {'pdfjs': '../src', 'pdfjs-web': '.'}});
|
||||
require(['pdfjs-web/app'], function (web) {
|
||||
require(['pdfjs-web/app', 'mozPrintCallback_polyfill.js'], function (web) {
|
||||
window.PDFViewerApplication = web.PDFViewerApplication;
|
||||
web.PDFViewerApplication.run(config);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user