diff --git a/public/_locales b/public/_locales index 38776318..3f2c11aa 160000 --- a/public/_locales +++ b/public/_locales @@ -1 +1 @@ -Subproject commit 38776318f3fd01eac77e205efe21877af0b69463 +Subproject commit 3f2c11aa9bdb1e1def38e5edf114cd1480df1719 diff --git a/src/config.ts b/src/config.ts index 6ef0112c..cccb1147 100644 --- a/src/config.ts +++ b/src/config.ts @@ -75,6 +75,7 @@ interface SBConfig { allowScrollingToEdit: boolean; deArrowInstalled: boolean; showDeArrowPromotion: boolean; + showZoomToFillError: boolean; // Used to cache calculated text color info categoryPillColors: { @@ -311,6 +312,7 @@ const syncDefaults = { allowScrollingToEdit: true, deArrowInstalled: false, showDeArrowPromotion: true, + showZoomToFillError: true, categoryPillColors: {}, diff --git a/src/content.ts b/src/content.ts index 7a23a0e5..549fc4a4 100644 --- a/src/content.ts +++ b/src/content.ts @@ -44,6 +44,7 @@ import { setupThumbnailListener } from "./utils/thumbnails"; import * as documentScript from "../dist/js/document.js"; import { Tooltip } from "./render/Tooltip"; import { isDeArrowInstalled } from "./utils/crossExtension"; +import { runCompatibilityChecks } from "./utils/compatibility"; const utils = new Utils(); @@ -87,7 +88,9 @@ utils.wait(() => Config.isReady(), 5000, 10).then(() => { Config.config.showDeArrowPromotion = false; } } - }, 5000) + }, 5000); + + runCompatibilityChecks(); }); const skipBuffer = 0.003; diff --git a/src/utils/compatibility.ts b/src/utils/compatibility.ts new file mode 100644 index 00000000..30a4ee61 --- /dev/null +++ b/src/utils/compatibility.ts @@ -0,0 +1,15 @@ +import Config from "../config"; + +export function runCompatibilityChecks() { + if (Config.config.showZoomToFillError) { + setTimeout(() => { + const zoomToFill = document.querySelector(".zoomtofillBtn"); + + if (zoomToFill) { + alert(chrome.i18n.getMessage("zoomToFillUnsupported")); + } + + Config.config.showZoomToFillError = false; + }, 10000); + } +} \ No newline at end of file