Backout of pull request #9345
This commit is contained in:
parent
70cad2f053
commit
057994d781
14
web/app.js
14
web/app.js
@ -15,10 +15,10 @@
|
|||||||
/* globals PDFBug, Stats */
|
/* globals PDFBug, Stats */
|
||||||
|
|
||||||
import {
|
import {
|
||||||
animationStarted, DEFAULT_SCALE_VALUE, getPDFFileNameFromURL, isFileSchema,
|
animationStarted, DEFAULT_SCALE_VALUE, getPDFFileNameFromURL, isValidRotation,
|
||||||
isValidRotation, MAX_SCALE, MIN_SCALE, noContextMenuHandler,
|
MAX_SCALE, MIN_SCALE, noContextMenuHandler, normalizeWheelEventDelta,
|
||||||
normalizeWheelEventDelta, parseQueryString, PresentationModeState,
|
parseQueryString, PresentationModeState, ProgressBar, RendererType,
|
||||||
ProgressBar, RendererType, TextLayerMode
|
TextLayerMode
|
||||||
} from './ui_utils';
|
} from './ui_utils';
|
||||||
import {
|
import {
|
||||||
build, createBlob, getDocument, getFilenameFromUrl, GlobalWorkerOptions,
|
build, createBlob, getDocument, getFilenameFromUrl, GlobalWorkerOptions,
|
||||||
@ -745,12 +745,6 @@ let PDFViewerApplication = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.url && isFileSchema(this.url)) {
|
|
||||||
let appConfig = this.appConfig;
|
|
||||||
appConfig.toolbar.download.setAttribute('hidden', 'true');
|
|
||||||
appConfig.secondaryToolbar.downloadButton.setAttribute('hidden', 'true');
|
|
||||||
}
|
|
||||||
|
|
||||||
let loadingTask = getDocument(parameters);
|
let loadingTask = getDocument(parameters);
|
||||||
this.pdfLoadingTask = loadingTask;
|
this.pdfLoadingTask = loadingTask;
|
||||||
|
|
||||||
|
@ -536,14 +536,6 @@ function noContextMenuHandler(evt) {
|
|||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
function isFileSchema(url) {
|
|
||||||
let i = 0, ii = url.length;
|
|
||||||
while (i < ii && url[i].trim() === '') {
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
return url.substr(i, 7).toLowerCase() === 'file://';
|
|
||||||
}
|
|
||||||
|
|
||||||
function isDataSchema(url) {
|
function isDataSchema(url) {
|
||||||
let i = 0, ii = url.length;
|
let i = 0, ii = url.length;
|
||||||
while (i < ii && url[i].trim() === '') {
|
while (i < ii && url[i].trim() === '') {
|
||||||
@ -843,7 +835,6 @@ export {
|
|||||||
VERTICAL_PADDING,
|
VERTICAL_PADDING,
|
||||||
isValidRotation,
|
isValidRotation,
|
||||||
isPortraitOrientation,
|
isPortraitOrientation,
|
||||||
isFileSchema,
|
|
||||||
cloneObj,
|
cloneObj,
|
||||||
PresentationModeState,
|
PresentationModeState,
|
||||||
RendererType,
|
RendererType,
|
||||||
|
Loading…
Reference in New Issue
Block a user