aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay <[email protected]>2023-07-19 20:30:16 -0400
committerAjay <[email protected]>2023-07-19 20:30:16 -0400
commite27a287a68144ff0669ecefd7b9e9f500560f025 (patch)
tree392328c4319b9d620fb8f8191c5d2e4a13194a3c
parent6f8c44b2eb69cbe6938a1ca85f6aa800fdc6ca67 (diff)
downloadSponsorBlock-e27a287a68144ff0669ecefd7b9e9f500560f025.tar.gz
SponsorBlock-e27a287a68144ff0669ecefd7b9e9f500560f025.zip
Better zoom to fill compatibility check
-rw-r--r--src/config.ts8
-rw-r--r--src/utils/compatibility.ts4
2 files changed, 8 insertions, 4 deletions
diff --git a/src/config.ts b/src/config.ts
index cccb1147..4b92b48b 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -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: {},
diff --git a/src/utils/compatibility.ts b/src/utils/compatibility.ts
index 30a4ee61..b08877e6 100644
--- a/src/utils/compatibility.ts
+++ b/src/utils/compatibility.ts
@@ -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);
}
} \ No newline at end of file