mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 13:07:05 +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;
|
allowScrollingToEdit: boolean;
|
||||||
deArrowInstalled: boolean;
|
deArrowInstalled: boolean;
|
||||||
showDeArrowPromotion: boolean;
|
showDeArrowPromotion: boolean;
|
||||||
|
showZoomToFillError: boolean;
|
||||||
|
|
||||||
// Used to cache calculated text color info
|
// Used to cache calculated text color info
|
||||||
categoryPillColors: {
|
categoryPillColors: {
|
||||||
@@ -311,6 +312,7 @@ const syncDefaults = {
|
|||||||
allowScrollingToEdit: true,
|
allowScrollingToEdit: true,
|
||||||
deArrowInstalled: false,
|
deArrowInstalled: false,
|
||||||
showDeArrowPromotion: true,
|
showDeArrowPromotion: true,
|
||||||
|
showZoomToFillError: true,
|
||||||
|
|
||||||
categoryPillColors: {},
|
categoryPillColors: {},
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ import { setupThumbnailListener } from "./utils/thumbnails";
|
|||||||
import * as documentScript from "../dist/js/document.js";
|
import * as documentScript from "../dist/js/document.js";
|
||||||
import { Tooltip } from "./render/Tooltip";
|
import { Tooltip } from "./render/Tooltip";
|
||||||
import { isDeArrowInstalled } from "./utils/crossExtension";
|
import { isDeArrowInstalled } from "./utils/crossExtension";
|
||||||
|
import { runCompatibilityChecks } from "./utils/compatibility";
|
||||||
|
|
||||||
const utils = new Utils();
|
const utils = new Utils();
|
||||||
|
|
||||||
@@ -87,7 +88,9 @@ utils.wait(() => Config.isReady(), 5000, 10).then(() => {
|
|||||||
Config.config.showDeArrowPromotion = false;
|
Config.config.showDeArrowPromotion = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 5000)
|
}, 5000);
|
||||||
|
|
||||||
|
runCompatibilityChecks();
|
||||||
});
|
});
|
||||||
|
|
||||||
const skipBuffer = 0.003;
|
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