From e820688510e2c1c24088e76a178a82ef8ebcaf4d Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Wed, 20 Sep 2023 09:09:52 +0200 Subject: [PATCH] Remove the `enableStampEditor` preference --- extensions/chromium/preferences_schema.json | 4 ---- web/app.js | 4 ++-- web/app_options.js | 8 -------- web/viewer.html | 2 +- 4 files changed, 3 insertions(+), 15 deletions(-) diff --git a/extensions/chromium/preferences_schema.json b/extensions/chromium/preferences_schema.json index 1e83464bc4a2e..6e32677acb043 100644 --- a/extensions/chromium/preferences_schema.json +++ b/extensions/chromium/preferences_schema.json @@ -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).", diff --git a/web/app.js b/web/app.js index d05e769312762..7e1b361da2e9d 100644 --- a/web/app.js +++ b/web/app.js @@ -546,8 +546,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( diff --git a/web/app_options.js b/web/app_options.js index 9f63deedba753..65be25b86e4e6 100644 --- a/web/app_options.js +++ b/web/app_options.js @@ -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", diff --git a/web/viewer.html b/web/viewer.html index 47d3929a5e907..3c172f02a1bb0 100644 --- a/web/viewer.html +++ b/web/viewer.html @@ -353,7 +353,7 @@ -