mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 20:47:11 +03:00
Add warning if zoom to fill is installed
This commit is contained in:
Submodule public/_locales updated: 38776318f3...3f2c11aa9b
@@ -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: {},
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
15
src/utils/compatibility.ts
Normal file
15
src/utils/compatibility.ts
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user