Better zoom to fill compatibility check

This commit is contained in:
Ajay 2023-07-19 20:30:16 -04:00
parent 6f8c44b2eb
commit e27a287a68
2 changed files with 8 additions and 4 deletions

View file

@ -75,7 +75,7 @@ interface SBConfig {
allowScrollingToEdit: boolean;
deArrowInstalled: boolean;
showDeArrowPromotion: boolean;
showZoomToFillError: boolean;
showZoomToFillError2: boolean;
// Used to cache calculated text color info
categoryPillColors: {
@ -148,6 +148,10 @@ class ConfigClass extends ProtoConfig<SBConfig, SBStorage> {
}
function migrateOldSyncFormats(config: SBConfig) {
if (config["showZoomToFillError"]) {
chrome.storage.sync.remove("showZoomToFillError");
}
if (!config["chapterCategoryAdded"]) {
config["chapterCategoryAdded"] = true;
@ -312,7 +316,7 @@ const syncDefaults = {
allowScrollingToEdit: true,
deArrowInstalled: false,
showDeArrowPromotion: true,
showZoomToFillError: true,
showZoomToFillError2: true,
categoryPillColors: {},

View file

@ -1,7 +1,7 @@
import Config from "../config";
export function runCompatibilityChecks() {
if (Config.config.showZoomToFillError) {
if (Config.config.showZoomToFillError2 && document.URL.includes("watch?v=")) {
setTimeout(() => {
const zoomToFill = document.querySelector(".zoomtofillBtn");
@ -9,7 +9,7 @@ export function runCompatibilityChecks() {
alert(chrome.i18n.getMessage("zoomToFillUnsupported"));
}
Config.config.showZoomToFillError = false;
Config.config.showZoomToFillError2 = false;
}, 10000);
}
}