Compare commits

...

6 Commits

Author SHA1 Message Date
Ajay
db9fc11f13 bump version 2023-07-19 20:31:38 -04:00
Ajay
76667f68ec Merge branch 'master' of https://github.com/ajayyy/SponsorBlock 2023-07-19 20:30:18 -04:00
Ajay
e27a287a68 Better zoom to fill compatibility check 2023-07-19 20:30:16 -04:00
Ajay Ramachandran
ce3731774d Merge pull request #1803 from ajayyy/dependabot/npm_and_yarn/word-wrap-1.2.4
Bump word-wrap from 1.2.3 to 1.2.4
2023-07-18 17:12:08 -04:00
dependabot[bot]
8cbf2bb50b Bump word-wrap from 1.2.3 to 1.2.4
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-18 20:27:55 +00:00
Ajay
6f8c44b2eb Fix category colors sometimes not working 2023-07-18 13:26:41 -04:00
5 changed files with 18 additions and 10 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "__MSG_fullName__",
"short_name": "SponsorBlock",
"version": "5.4.11",
"version": "5.4.12",
"default_locale": "en",
"description": "__MSG_Description__",
"homepage_url": "https://sponsor.ajay.app",

10
package-lock.json generated
View File

@@ -13332,8 +13332,9 @@
"dev": true
},
"node_modules/word-wrap": {
"version": "1.2.3",
"integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz",
"integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==",
"dev": true,
"engines": {
"node": ">=0.10.0"
@@ -23348,8 +23349,9 @@
"dev": true
},
"word-wrap": {
"version": "1.2.3",
"integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz",
"integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==",
"dev": true
},
"wrap-ansi": {

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

@@ -2489,7 +2489,9 @@ function setCategoryColorCSSVariables() {
if (!styleContainer) {
styleContainer = document.createElement("style");
styleContainer.id = "sbCategoryColorStyle";
document.head.appendChild(styleContainer)
const head = (document.head || document.documentElement);
head.appendChild(styleContainer)
}
let css = ":root {"

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);
}
}