mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Add configuration for segment failed to fetch warning
This commit is contained in:
parent
6db498ccb1
commit
b3afd0403e
2 changed files with 4 additions and 1 deletions
|
@ -68,6 +68,7 @@ interface SBConfig {
|
|||
showCategoryWithoutPermission: boolean;
|
||||
showSegmentNameInChapterBar: boolean;
|
||||
useVirtualTime: boolean;
|
||||
showSegmentFailedToFetchWarning: boolean;
|
||||
|
||||
// Used to cache calculated text color info
|
||||
categoryPillColors: {
|
||||
|
@ -202,6 +203,7 @@ const Config: SBObject = {
|
|||
showCategoryWithoutPermission: false,
|
||||
showSegmentNameInChapterBar: true,
|
||||
useVirtualTime: true,
|
||||
showSegmentFailedToFetchWarning: true,
|
||||
|
||||
categoryPillColors: {},
|
||||
|
||||
|
|
|
@ -1926,7 +1926,8 @@ function startOrEndTimingNewSegment() {
|
|||
|
||||
importExistingChapters(false);
|
||||
|
||||
if (lastResponseStatus !== 200 && lastResponseStatus !== 404 && !shownSegmentFailedToFetchWarning) {
|
||||
if (lastResponseStatus !== 200 && lastResponseStatus !== 404
|
||||
&& !shownSegmentFailedToFetchWarning && Config.config.showSegmentFailedToFetchWarning) {
|
||||
alert(chrome.i18n.getMessage("segmentFetchFailureWarning"));
|
||||
|
||||
shownSegmentFailedToFetchWarning = true;
|
||||
|
|
Loading…
Reference in a new issue