From b9f5e78e15c4b2ffbd40dbec425c6f0742bf8b4e Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 10 Aug 2024 15:54:03 +0200 Subject: [PATCH] Remove the `enableHighlightEditor` preference This was enabled by default in Firefox 126, see [bug 1867513](https://bugzilla.mozilla.org/show_bug.cgi?id=1867513), so hopefully we should be able to remove the option/preference now. --- extensions/chromium/preferences_schema.json | 4 ---- web/app.js | 5 ----- web/app_options.js | 8 -------- web/viewer.html | 2 +- 4 files changed, 1 insertion(+), 18 deletions(-) diff --git a/extensions/chromium/preferences_schema.json b/extensions/chromium/preferences_schema.json index f965785021fc2..886cc87b44029 100644 --- a/extensions/chromium/preferences_schema.json +++ b/extensions/chromium/preferences_schema.json @@ -94,10 +94,6 @@ "description": "Whether to allow execution of active content (JavaScript) by PDF files.", "default": false }, - "enableHighlightEditor": { - "type": "boolean", - "default": false - }, "enableHighlightFloatingButton": { "type": "boolean", "default": false diff --git a/web/app.js b/web/app.js index d4d18516eaafc..717f7c43bafe5 100644 --- a/web/app.js +++ b/web/app.js @@ -543,11 +543,6 @@ const PDFViewerApplication = { typeof AbortSignal.any === "function") && annotationEditorMode !== AnnotationEditorType.DISABLE ) { - const editorHighlightButton = appConfig.toolbar?.editorHighlightButton; - if (editorHighlightButton && AppOptions.get("enableHighlightEditor")) { - editorHighlightButton.hidden = false; - } - this.annotationEditorParams = new AnnotationEditorParams( appConfig.annotationEditorParams, eventBus diff --git a/web/app_options.js b/web/app_options.js index 53c4b5325dcc9..3b70a4a1c6a34 100644 --- a/web/app_options.js +++ b/web/app_options.js @@ -200,14 +200,6 @@ const defaultOptions = { value: true, kind: OptionKind.VIEWER + OptionKind.PREFERENCE + OptionKind.EVENT_DISPATCH, }, - enableHighlightEditor: { - // 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: typeof PDFJSDev === "undefined" || PDFJSDev.test("TESTING"), - kind: OptionKind.VIEWER + OptionKind.PREFERENCE, - }, enableHighlightFloatingButton: { // We'll probably want to make some experiments before enabling this // in Firefox release, but it has to be temporary. diff --git a/web/viewer.html b/web/viewer.html index d88391b8090c9..7c31be1037c8c 100644 --- a/web/viewer.html +++ b/web/viewer.html @@ -363,7 +363,7 @@
-