Merge pull request #17006 from Snuffleupagus/rm-enableStampEditor-pref

Remove the `enableStampEditor` preference
This commit is contained in:
Jonas Jenwald 2023-10-25 16:24:49 +02:00 committed by GitHub
commit 0fc899338c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 15 deletions

View File

@ -81,10 +81,6 @@
"description": "Whether to allow execution of active content (JavaScript) by PDF files.",
"default": false
},
"enableStampEditor": {
"type": "boolean",
"default": true
},
"disableRange": {
"title": "Disable range requests",
"description": "Whether to disable range requests (not recommended).",

View File

@ -542,8 +542,8 @@ const PDFViewerApplication = {
if (appConfig.annotationEditorParams) {
if (annotationEditorMode !== AnnotationEditorType.DISABLE) {
if (AppOptions.get("enableStampEditor") && isOffscreenCanvasSupported) {
appConfig.toolbar?.editorStampButton?.classList.remove("hidden");
if (!isOffscreenCanvasSupported) {
appConfig.toolbar?.editorStampButton?.classList.add("hidden");
}
this.annotationEditorParams = new AnnotationEditorParams(

View File

@ -103,14 +103,6 @@ const defaultOptions = {
value: typeof PDFJSDev === "undefined" || !PDFJSDev.test("CHROME"),
kind: OptionKind.VIEWER + OptionKind.PREFERENCE,
},
enableStampEditor: {
// We'll probably want to make some experiments before enabling this
// in Firefox release, but it has to be temporary.
// TODO: remove it when unnecessary.
/** @type {boolean} */
value: true,
kind: OptionKind.VIEWER + OptionKind.PREFERENCE,
},
externalLinkRel: {
/** @type {string} */
value: "noopener noreferrer nofollow",

View File

@ -352,7 +352,7 @@ See https://github.com/adobe-type-tools/cmap-resources
<button id="editorInk" class="toolbarButton" disabled="disabled" title="Draw" role="radio" aria-checked="false" aria-controls="editorInkParamsToolbar" tabindex="35" data-l10n-id="pdfjs-editor-ink-button">
<span data-l10n-id="pdfjs-editor-ink-button-label">Draw</span>
</button>
<button id="editorStamp" class="toolbarButton hidden" disabled="disabled" title="Add or edit images" role="radio" aria-checked="false" aria-controls="editorStampParamsToolbar" tabindex="36" data-l10n-id="pdfjs-editor-stamp-button">
<button id="editorStamp" class="toolbarButton" disabled="disabled" title="Add or edit images" role="radio" aria-checked="false" aria-controls="editorStampParamsToolbar" tabindex="36" data-l10n-id="pdfjs-editor-stamp-button">
<span data-l10n-id="pdfjs-editor-stamp-button-label">Add or edit images</span>
</button>
</div>