diff --git a/extensions/chromium/options/migration.js b/extensions/chromium/options/migration.js index ca547850c4214..d2d8720d4eb9c 100644 --- a/extensions/chromium/options/migration.js +++ b/extensions/chromium/options/migration.js @@ -81,6 +81,9 @@ limitations under the License. 'disableTextLayer', 'enhanceTextSelection', 'textLayerMode', + 'showPreviousViewOnLoad', + 'disablePageMode', + 'viewOnLoad', ], function(items) { // Migration code for https://github.com/mozilla/pdf.js/pull/7635. if (typeof items.enableHandToolOnLoad === 'boolean') { @@ -113,6 +116,20 @@ limitations under the License. storageSync.remove(['disableTextLayer', 'enhanceTextSelection']); } } + // Migration code for https://github.com/mozilla/pdf.js/pull/10502. + if (typeof items.showPreviousViewOnLoad === 'boolean') { + if (!items.showPreviousViewOnLoad) { + storageSync.set({ + viewOnLoad: 1, + }, function() { + if (!chrome.runtime.lastError) { + storageSync.remove(['showPreviousViewOnLoad', 'disablePageMode']); + } + }); + } else { + storageSync.remove(['showPreviousViewOnLoad', 'disablePageMode']); + } + } }); } })(); diff --git a/extensions/chromium/options/options.html b/extensions/chromium/options/options.html index 412e80bb1a11c..57ddae7b14305 100644 --- a/extensions/chromium/options/options.html +++ b/extensions/chromium/options/options.html @@ -43,6 +43,19 @@ + +