mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2026-01-31 06:41:01 +03:00
Disable show info message if chapter enabled
This commit is contained in:
@@ -951,9 +951,10 @@ async function sponsorsLookup(keepOldSubmissions = true) {
|
|||||||
|
|
||||||
if (!showChapterMessage
|
if (!showChapterMessage
|
||||||
&& Config.config.showChapterInfoMessage
|
&& Config.config.showChapterInfoMessage
|
||||||
&& Config.config.payments.freeAccess
|
&& Config.config.payments.freeAccess) {
|
||||||
&& !utils.getCategorySelection("chapter")) {
|
|
||||||
Config.config.showChapterInfoMessage = false;
|
Config.config.showChapterInfoMessage = false;
|
||||||
|
|
||||||
|
if (!utils.getCategorySelection("chapter")) {
|
||||||
const prependElement = document.querySelector(".ytp-chrome-bottom") as HTMLElement;
|
const prependElement = document.querySelector(".ytp-chrome-bottom") as HTMLElement;
|
||||||
if (prependElement) {
|
if (prependElement) {
|
||||||
Config.config.showChapterInfoMessage = false;
|
Config.config.showChapterInfoMessage = false;
|
||||||
@@ -968,6 +969,7 @@ async function sponsorsLookup(keepOldSubmissions = true) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const categories: string[] = Config.config.categorySelections.map((category) => category.name);
|
const categories: string[] = Config.config.categorySelections.map((category) => category.name);
|
||||||
if (showChapterMessage && !categories.includes("chapter")) categories.push("chapter");
|
if (showChapterMessage && !categories.includes("chapter")) categories.push("chapter");
|
||||||
|
|||||||
Reference in New Issue
Block a user