mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-11 14:07:13 +03:00
Better zoom to fill compatibility check
This commit is contained in:
@@ -75,7 +75,7 @@ interface SBConfig {
|
|||||||
allowScrollingToEdit: boolean;
|
allowScrollingToEdit: boolean;
|
||||||
deArrowInstalled: boolean;
|
deArrowInstalled: boolean;
|
||||||
showDeArrowPromotion: boolean;
|
showDeArrowPromotion: boolean;
|
||||||
showZoomToFillError: boolean;
|
showZoomToFillError2: boolean;
|
||||||
|
|
||||||
// Used to cache calculated text color info
|
// Used to cache calculated text color info
|
||||||
categoryPillColors: {
|
categoryPillColors: {
|
||||||
@@ -148,6 +148,10 @@ class ConfigClass extends ProtoConfig<SBConfig, SBStorage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function migrateOldSyncFormats(config: SBConfig) {
|
function migrateOldSyncFormats(config: SBConfig) {
|
||||||
|
if (config["showZoomToFillError"]) {
|
||||||
|
chrome.storage.sync.remove("showZoomToFillError");
|
||||||
|
}
|
||||||
|
|
||||||
if (!config["chapterCategoryAdded"]) {
|
if (!config["chapterCategoryAdded"]) {
|
||||||
config["chapterCategoryAdded"] = true;
|
config["chapterCategoryAdded"] = true;
|
||||||
|
|
||||||
@@ -312,7 +316,7 @@ const syncDefaults = {
|
|||||||
allowScrollingToEdit: true,
|
allowScrollingToEdit: true,
|
||||||
deArrowInstalled: false,
|
deArrowInstalled: false,
|
||||||
showDeArrowPromotion: true,
|
showDeArrowPromotion: true,
|
||||||
showZoomToFillError: true,
|
showZoomToFillError2: true,
|
||||||
|
|
||||||
categoryPillColors: {},
|
categoryPillColors: {},
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import Config from "../config";
|
import Config from "../config";
|
||||||
|
|
||||||
export function runCompatibilityChecks() {
|
export function runCompatibilityChecks() {
|
||||||
if (Config.config.showZoomToFillError) {
|
if (Config.config.showZoomToFillError2 && document.URL.includes("watch?v=")) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const zoomToFill = document.querySelector(".zoomtofillBtn");
|
const zoomToFill = document.querySelector(".zoomtofillBtn");
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@ export function runCompatibilityChecks() {
|
|||||||
alert(chrome.i18n.getMessage("zoomToFillUnsupported"));
|
alert(chrome.i18n.getMessage("zoomToFillUnsupported"));
|
||||||
}
|
}
|
||||||
|
|
||||||
Config.config.showZoomToFillError = false;
|
Config.config.showZoomToFillError2 = false;
|
||||||
}, 10000);
|
}, 10000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user