Add warning if zoom to fill is installed

This commit is contained in:
Ajay 2023-07-14 20:37:08 -04:00
parent cee00a87c1
commit 8bcaf906fb
4 changed files with 22 additions and 2 deletions

@ -1 +1 @@
Subproject commit 38776318f3fd01eac77e205efe21877af0b69463
Subproject commit 3f2c11aa9bdb1e1def38e5edf114cd1480df1719

View file

@ -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: {},

View file

@ -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;

View file

@ -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);
}
}