Merge pull request #4333 from dferer/requirable-viewer
Made viewer's webViewerLoad callable from outside viewer.js
This commit is contained in:
commit
cab5d7b96f
@ -1592,12 +1592,12 @@ var DocumentOutlineView = function documentOutlineView(outline) {
|
|||||||
//})();
|
//})();
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function webViewerLoad(evt) {
|
function webViewerLoad(evt) {
|
||||||
PDFView.initialize();
|
PDFView.initialize();
|
||||||
|
|
||||||
//#if (GENERIC || B2G)
|
//#if (GENERIC || B2G)
|
||||||
var params = PDFView.parseQueryString(document.location.search.substring(1));
|
var params = PDFView.parseQueryString(document.location.search.substring(1));
|
||||||
var file = params.file || DEFAULT_URL;
|
var file = 'file' in params ? params.file : DEFAULT_URL;
|
||||||
//#endif
|
//#endif
|
||||||
//#if (FIREFOX || MOZCENTRAL)
|
//#if (FIREFOX || MOZCENTRAL)
|
||||||
//var file = window.location.href.split('#')[0];
|
//var file = window.location.href.split('#')[0];
|
||||||
@ -1813,7 +1813,9 @@ document.addEventListener('DOMContentLoaded', function webViewerLoad(evt) {
|
|||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
//#if !B2G && !CHROME
|
//#if !B2G && !CHROME
|
||||||
PDFView.open(file, 0);
|
if (file) {
|
||||||
|
PDFView.open(file, 0);
|
||||||
|
}
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
//#if CHROME
|
//#if CHROME
|
||||||
@ -1845,7 +1847,9 @@ document.addEventListener('DOMContentLoaded', function webViewerLoad(evt) {
|
|||||||
// PDFView.open(file, 0);
|
// PDFView.open(file, 0);
|
||||||
//});
|
//});
|
||||||
//#endif
|
//#endif
|
||||||
}, true);
|
}
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', webViewerLoad, true);
|
||||||
|
|
||||||
function updateViewarea() {
|
function updateViewarea() {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user