mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 18:25:37 +02:00
Move the pdfBug
option from the global PDFJS
object and into getDocument
instead
Also removes the now unused `getDefaultSetting` helper function.
This commit is contained in:
parent
1d03ad0060
commit
212553840f
7 changed files with 33 additions and 44 deletions
|
@ -17,7 +17,6 @@ import {
|
|||
assert, CMapCompressionType, removeNullCharacters, stringToBytes,
|
||||
unreachable, warn
|
||||
} from '../shared/util';
|
||||
import globalScope from '../shared/global_scope';
|
||||
|
||||
const DEFAULT_LINK_REL = 'noopener noreferrer nofollow';
|
||||
const SVG_NS = 'http://www.w3.org/2000/svg';
|
||||
|
@ -329,18 +328,6 @@ function getFilenameFromUrl(url) {
|
|||
return url.substring(url.lastIndexOf('/', end) + 1, end);
|
||||
}
|
||||
|
||||
function getDefaultSetting(id) {
|
||||
// The list of the settings and their default is maintained for backward
|
||||
// compatibility and shall not be extended or modified. See also global.js.
|
||||
var globalSettings = globalScope.PDFJS;
|
||||
switch (id) {
|
||||
case 'pdfBug':
|
||||
return globalSettings ? globalSettings.pdfBug : false;
|
||||
default:
|
||||
throw new Error('Unknown default setting: ' + id);
|
||||
}
|
||||
}
|
||||
|
||||
class StatTimer {
|
||||
constructor(enable = true) {
|
||||
this.enabled = !!enable;
|
||||
|
@ -420,7 +407,6 @@ export {
|
|||
addLinkAttributes,
|
||||
getFilenameFromUrl,
|
||||
LinkTarget,
|
||||
getDefaultSetting,
|
||||
DEFAULT_LINK_REL,
|
||||
DOMCanvasFactory,
|
||||
DOMCMapReaderFactory,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue