mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 05:27:03 +03:00
Only show import when chapter enabled
This commit is contained in:
@@ -46,7 +46,7 @@
|
|||||||
<div id="issueReporterTimeButtons"></div>
|
<div id="issueReporterTimeButtons"></div>
|
||||||
<div id="issueReporterImportExport" class="hidden">
|
<div id="issueReporterImportExport" class="hidden">
|
||||||
<div id="importExportButtons">
|
<div id="importExportButtons">
|
||||||
<button id="importSegmentsButton" title="__MSG_importSegments__">
|
<button id="importSegmentsButton" title="__MSG_importSegments__" class="hidden">
|
||||||
<img src="/icons/import.svg" alt="Refresh icon" id="importSegments" />
|
<img src="/icons/import.svg" alt="Refresh icon" id="importSegments" />
|
||||||
</button>
|
</button>
|
||||||
<button id="exportSegmentsButton" title="__MSG_exportSegments__">
|
<button id="exportSegmentsButton" title="__MSG_exportSegments__">
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ interface SBConfig {
|
|||||||
categoryPillUpdate: boolean,
|
categoryPillUpdate: boolean,
|
||||||
darkMode: boolean,
|
darkMode: boolean,
|
||||||
showCategoryGuidelines: boolean,
|
showCategoryGuidelines: boolean,
|
||||||
|
chaptersActivated: boolean,
|
||||||
|
|
||||||
// Used to cache calculated text color info
|
// Used to cache calculated text color info
|
||||||
categoryPillColors: {
|
categoryPillColors: {
|
||||||
@@ -174,6 +175,7 @@ const Config: SBObject = {
|
|||||||
categoryPillUpdate: false,
|
categoryPillUpdate: false,
|
||||||
darkMode: true,
|
darkMode: true,
|
||||||
showCategoryGuidelines: true,
|
showCategoryGuidelines: true,
|
||||||
|
chaptersActivated: true,
|
||||||
|
|
||||||
categoryPillColors: {},
|
categoryPillColors: {},
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import Config from "./config";
|
import Config from "./config";
|
||||||
|
|
||||||
import Utils from "./utils";
|
import Utils from "./utils";
|
||||||
import { SponsorTime, SponsorHideType, ActionType, SegmentUUID, SponsorSourceType, StorageChangesObject } from "./types";
|
import { SponsorTime, SponsorHideType, ActionType, SegmentUUID, SponsorSourceType, StorageChangesObject, CategorySkipOption } from "./types";
|
||||||
import { Message, MessageResponse, IsInfoFoundMessageResponse, ImportSegmentsResponse } from "./messageTypes";
|
import { Message, MessageResponse, IsInfoFoundMessageResponse, ImportSegmentsResponse } from "./messageTypes";
|
||||||
import { showDonationLink } from "./utils/configUtils";
|
import { showDonationLink } from "./utils/configUtils";
|
||||||
import { AnimationUtils } from "./utils/animationUtils";
|
import { AnimationUtils } from "./utils/animationUtils";
|
||||||
@@ -510,7 +510,10 @@ async function runThePopup(messageListener?: MessageListener): Promise<void> {
|
|||||||
|
|
||||||
if (downloadedTimes.length > 0) {
|
if (downloadedTimes.length > 0) {
|
||||||
PageElements.issueReporterImportExport.classList.remove("hidden");
|
PageElements.issueReporterImportExport.classList.remove("hidden");
|
||||||
} else {
|
if (utils.getCategorySelection("chapter")?.option === CategorySkipOption.ShowOverlay) {
|
||||||
|
PageElements.importSegmentsButton.classList.remove("hidden");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
PageElements.issueReporterImportExport.classList.add("hidden");
|
PageElements.issueReporterImportExport.classList.add("hidden");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user