Changed to lowercase everywhere the hashParams is compared
This commit is contained in:
parent
4623f20221
commit
293d566f67
@ -1769,45 +1769,45 @@ function webViewerInitialized() {
|
|||||||
var hash = document.location.hash.substring(1);
|
var hash = document.location.hash.substring(1);
|
||||||
var hashParams = PDFView.parseQueryString(hash);
|
var hashParams = PDFView.parseQueryString(hash);
|
||||||
|
|
||||||
if ('disableWorker' in hashParams) {
|
if ('disableworker' in hashParams) {
|
||||||
PDFJS.disableWorker = (hashParams['disableWorker'] === 'true');
|
PDFJS.disableWorker = (hashParams['disableworker'] === 'true');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('disableRange' in hashParams) {
|
if ('disablerange' in hashParams) {
|
||||||
PDFJS.disableRange = (hashParams['disableRange'] === 'true');
|
PDFJS.disableRange = (hashParams['disablerange'] === 'true');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('disableAutoFetch' in hashParams) {
|
if ('disableautofetch' in hashParams) {
|
||||||
PDFJS.disableAutoFetch = (hashParams['disableAutoFetch'] === 'true');
|
PDFJS.disableAutoFetch = (hashParams['disableautofetch'] === 'true');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('disableFontFace' in hashParams) {
|
if ('disablefontface' in hashParams) {
|
||||||
PDFJS.disableFontFace = (hashParams['disableFontFace'] === 'true');
|
PDFJS.disableFontFace = (hashParams['disablefontface'] === 'true');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('disableHistory' in hashParams) {
|
if ('disablehistory' in hashParams) {
|
||||||
PDFJS.disableHistory = (hashParams['disableHistory'] === 'true');
|
PDFJS.disableHistory = (hashParams['disablehistory'] === 'true');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('webgl' in hashParams) {
|
if ('webgl' in hashParams) {
|
||||||
PDFJS.disableWebGL = (hashParams['webgl'] !== 'true');
|
PDFJS.disableWebGL = (hashParams['webgl'] !== 'true');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('useOnlyCssZoom' in hashParams) {
|
if ('useonlycsszoom' in hashParams) {
|
||||||
PDFJS.useOnlyCssZoom = (hashParams['useOnlyCssZoom'] === 'true');
|
PDFJS.useOnlyCssZoom = (hashParams['useonlycsszoom'] === 'true');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('verbosity' in hashParams) {
|
if ('verbosity' in hashParams) {
|
||||||
PDFJS.verbosity = hashParams['verbosity'] | 0;
|
PDFJS.verbosity = hashParams['verbosity'] | 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('ignoreCurrentPositionOnZoom' in hashParams) {
|
if ('ignorecurrentpositiononzoom' in hashParams) {
|
||||||
IGNORE_CURRENT_POSITION_ON_ZOOM =
|
IGNORE_CURRENT_POSITION_ON_ZOOM =
|
||||||
(hashParams['ignoreCurrentPositionOnZoom'] === 'true');
|
(hashParams['ignorecurrentpositiononzoom'] === 'true');
|
||||||
}
|
}
|
||||||
|
|
||||||
//#if !PRODUCTION
|
//#if !PRODUCTION
|
||||||
if ('disableBcmaps' in hashParams && hashParams['disableBcmaps']) {
|
if ('disablebcmaps' in hashParams && hashParams['disablebcmaps']) {
|
||||||
PDFJS.cMapUrl = '../external/cmaps/';
|
PDFJS.cMapUrl = '../external/cmaps/';
|
||||||
PDFJS.cMapPacked = false;
|
PDFJS.cMapPacked = false;
|
||||||
}
|
}
|
||||||
@ -1829,8 +1829,8 @@ function webViewerInitialized() {
|
|||||||
//}
|
//}
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
if ('textLayer' in hashParams) {
|
if ('textlayer' in hashParams) {
|
||||||
switch (hashParams['textLayer']) {
|
switch (hashParams['textlayer']) {
|
||||||
case 'off':
|
case 'off':
|
||||||
PDFJS.disableTextLayer = true;
|
PDFJS.disableTextLayer = true;
|
||||||
break;
|
break;
|
||||||
@ -1838,18 +1838,18 @@ function webViewerInitialized() {
|
|||||||
case 'shadow':
|
case 'shadow':
|
||||||
case 'hover':
|
case 'hover':
|
||||||
var viewer = document.getElementById('viewer');
|
var viewer = document.getElementById('viewer');
|
||||||
viewer.classList.add('textLayer-' + hashParams['textLayer']);
|
viewer.classList.add('textLayer-' + hashParams['textlayer']);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#if !(FIREFOX || MOZCENTRAL)
|
//#if !(FIREFOX || MOZCENTRAL)
|
||||||
if ('pdfBug' in hashParams) {
|
if ('pdfbug' in hashParams) {
|
||||||
//#else
|
//#else
|
||||||
//if ('pdfBug' in hashParams && FirefoxCom.requestSync('pdfBugEnabled')) {
|
//if ('pdfBug' in hashParams && FirefoxCom.requestSync('pdfBugEnabled')) {
|
||||||
//#endif
|
//#endif
|
||||||
PDFJS.pdfBug = true;
|
PDFJS.pdfBug = true;
|
||||||
var pdfBug = hashParams['pdfBug'];
|
var pdfBug = hashParams['pdfbug'];
|
||||||
var enabled = pdfBug.split(',');
|
var enabled = pdfBug.split(',');
|
||||||
PDFBug.enable(enabled);
|
PDFBug.enable(enabled);
|
||||||
PDFBug.init();
|
PDFBug.init();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user