From 9beeffc679d169b33794521ade73d9ffe8457617 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Mon, 12 Apr 2021 20:30:42 +0200 Subject: [PATCH] Force old chrome installs to force-enable the zoom limit --- src/ext/conf/ExtConfPatches.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/ext/conf/ExtConfPatches.js b/src/ext/conf/ExtConfPatches.js index 694cdeb..bf5bcf7 100644 --- a/src/ext/conf/ExtConfPatches.js +++ b/src/ext/conf/ExtConfPatches.js @@ -476,6 +476,31 @@ const ExtensionConfPatch = [ // do nothing } } + }, { + forVersion: '5.0.2', + updateFn: (userOptions, defaultOptions) => { + try { + if (! userOptions.mitigations) { + userOptions.mitigations = { + zoomLimit: { + enabled: true, + limit: 0.997, + fullscreenOnly: true + } + } + } else if (BrowserDetect.chrome) { + userOptions.mitigations = { + zoomLimit: { + enabled: true, + limit: 0.997, + fullscreenOnly: true + } + } + } + } catch (e) { + // do nothing + } + } } ];