mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 20:17:05 +03:00
Add configuration for segment failed to fetch warning
This commit is contained in:
@@ -68,6 +68,7 @@ interface SBConfig {
|
|||||||
showCategoryWithoutPermission: boolean;
|
showCategoryWithoutPermission: boolean;
|
||||||
showSegmentNameInChapterBar: boolean;
|
showSegmentNameInChapterBar: boolean;
|
||||||
useVirtualTime: boolean;
|
useVirtualTime: boolean;
|
||||||
|
showSegmentFailedToFetchWarning: boolean;
|
||||||
|
|
||||||
// Used to cache calculated text color info
|
// Used to cache calculated text color info
|
||||||
categoryPillColors: {
|
categoryPillColors: {
|
||||||
@@ -202,6 +203,7 @@ const Config: SBObject = {
|
|||||||
showCategoryWithoutPermission: false,
|
showCategoryWithoutPermission: false,
|
||||||
showSegmentNameInChapterBar: true,
|
showSegmentNameInChapterBar: true,
|
||||||
useVirtualTime: true,
|
useVirtualTime: true,
|
||||||
|
showSegmentFailedToFetchWarning: true,
|
||||||
|
|
||||||
categoryPillColors: {},
|
categoryPillColors: {},
|
||||||
|
|
||||||
|
|||||||
@@ -1926,7 +1926,8 @@ function startOrEndTimingNewSegment() {
|
|||||||
|
|
||||||
importExistingChapters(false);
|
importExistingChapters(false);
|
||||||
|
|
||||||
if (lastResponseStatus !== 200 && lastResponseStatus !== 404 && !shownSegmentFailedToFetchWarning) {
|
if (lastResponseStatus !== 200 && lastResponseStatus !== 404
|
||||||
|
&& !shownSegmentFailedToFetchWarning && Config.config.showSegmentFailedToFetchWarning) {
|
||||||
alert(chrome.i18n.getMessage("segmentFetchFailureWarning"));
|
alert(chrome.i18n.getMessage("segmentFetchFailureWarning"));
|
||||||
|
|
||||||
shownSegmentFailedToFetchWarning = true;
|
shownSegmentFailedToFetchWarning = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user