mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-31 11:56:40 +03:00
Compare commits
5 Commits
6.0.1
...
e1b18944bb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1b18944bb | ||
|
|
068307f98a | ||
|
|
9deb69b71b | ||
|
|
26f9a85b5b | ||
|
|
bc516c21fb |
@@ -80,9 +80,9 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div data-type="react-AdvancedSkipOptionsComponent"></div>
|
<div data-type="react-AdvancedSkipOptionsComponent" class="hide-when-skip-profile"></div>
|
||||||
|
|
||||||
<div data-type="toggle" data-sync="forceChannelCheck">
|
<div data-type="toggle" data-sync="forceChannelCheck" class="hide-when-skip-profile">
|
||||||
<div class="switch-container">
|
<div class="switch-container">
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="forceChannelCheck" type="checkbox" checked>
|
<input id="forceChannelCheck" type="checkbox" checked>
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
<div class="small-description">__MSG_whatForceChannelCheck__</div>
|
<div class="small-description">__MSG_whatForceChannelCheck__</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div data-type="toggle" data-sync="showCategoryWithoutPermission">
|
<div data-type="toggle" data-sync="showCategoryWithoutPermission" class="hide-when-skip-profile">
|
||||||
<div class="switch-container">
|
<div class="switch-container">
|
||||||
<label class="switch">
|
<label class="switch">
|
||||||
<input id="showCategoryWithoutPermission" type="checkbox" checked>
|
<input id="showCategoryWithoutPermission" type="checkbox" checked>
|
||||||
|
|||||||
@@ -591,6 +591,8 @@
|
|||||||
#sponsorTimesDonateContainer a {
|
#sponsorTimesDonateContainer a {
|
||||||
color: var(--sb-main-fg-color);
|
color: var(--sb-main-fg-color);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
||||||
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -123,6 +123,8 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||||||
style.marginTop = "15px";
|
style.marginTop = "15px";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const borderColor = this.state.selectedCategory ? Config.config.barTypes[this.state.selectedCategory]?.color : null;
|
||||||
|
|
||||||
// Create time display
|
// Create time display
|
||||||
let timeDisplay: JSX.Element;
|
let timeDisplay: JSX.Element;
|
||||||
const timeDisplayStyle: React.CSSProperties = {};
|
const timeDisplayStyle: React.CSSProperties = {};
|
||||||
@@ -151,7 +153,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||||||
<input id={"submittingTime0" + this.idSuffix}
|
<input id={"submittingTime0" + this.idSuffix}
|
||||||
className="sponsorTimeEdit sponsorTimeEditInput"
|
className="sponsorTimeEdit sponsorTimeEditInput"
|
||||||
type="text"
|
type="text"
|
||||||
style={{color: "inherit", backgroundColor: "inherit"}}
|
style={{color: "inherit", backgroundColor: "inherit", borderColor}}
|
||||||
value={this.state.sponsorTimeEdits[0] ?? ""}
|
value={this.state.sponsorTimeEdits[0] ?? ""}
|
||||||
onKeyDown={(e) => e.stopPropagation()}
|
onKeyDown={(e) => e.stopPropagation()}
|
||||||
onKeyUp={(e) => e.stopPropagation()}
|
onKeyUp={(e) => e.stopPropagation()}
|
||||||
@@ -168,7 +170,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||||||
<input id={"submittingTime1" + this.idSuffix}
|
<input id={"submittingTime1" + this.idSuffix}
|
||||||
className="sponsorTimeEdit sponsorTimeEditInput"
|
className="sponsorTimeEdit sponsorTimeEditInput"
|
||||||
type="text"
|
type="text"
|
||||||
style={{color: "inherit", backgroundColor: "inherit"}}
|
style={{color: "inherit", backgroundColor: "inherit", borderColor}}
|
||||||
value={this.state.sponsorTimeEdits[1] ?? ""}
|
value={this.state.sponsorTimeEdits[1] ?? ""}
|
||||||
onKeyDown={(e) => e.stopPropagation()}
|
onKeyDown={(e) => e.stopPropagation()}
|
||||||
onKeyUp={(e) => e.stopPropagation()}
|
onKeyUp={(e) => e.stopPropagation()}
|
||||||
@@ -215,7 +217,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||||||
<select id={"sponsorTimeCategories" + this.idSuffix}
|
<select id={"sponsorTimeCategories" + this.idSuffix}
|
||||||
className="sponsorTimeEditSelector sponsorTimeCategories"
|
className="sponsorTimeEditSelector sponsorTimeCategories"
|
||||||
ref={this.categoryOptionRef}
|
ref={this.categoryOptionRef}
|
||||||
style={{color: "inherit", backgroundColor: "inherit"}}
|
style={{color: "inherit", backgroundColor: "inherit", borderColor}}
|
||||||
value={this.state.selectedCategory}
|
value={this.state.selectedCategory}
|
||||||
onChange={(event) => this.categorySelectionChange(event)}>
|
onChange={(event) => this.categorySelectionChange(event)}>
|
||||||
{this.getCategoryOptions()}
|
{this.getCategoryOptions()}
|
||||||
@@ -240,7 +242,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||||||
<select id={"sponsorTimeActionTypes" + this.idSuffix}
|
<select id={"sponsorTimeActionTypes" + this.idSuffix}
|
||||||
className="sponsorTimeEditSelector sponsorTimeActionTypes"
|
className="sponsorTimeEditSelector sponsorTimeActionTypes"
|
||||||
value={this.state.selectedActionType}
|
value={this.state.selectedActionType}
|
||||||
style={{color: "inherit", backgroundColor: "inherit"}}
|
style={{color: "inherit", backgroundColor: "inherit", borderColor}}
|
||||||
ref={this.actionTypeOptionRef}
|
ref={this.actionTypeOptionRef}
|
||||||
onChange={(e) => this.actionTypeSelectionChange(e)}>
|
onChange={(e) => this.actionTypeSelectionChange(e)}>
|
||||||
{this.getActionTypeOptions(sponsorTime)}
|
{this.getActionTypeOptions(sponsorTime)}
|
||||||
@@ -269,7 +271,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||||||
<div onBlur={() => this.setState({chapterNameSelectorOpen: false})}>
|
<div onBlur={() => this.setState({chapterNameSelectorOpen: false})}>
|
||||||
<input id={"chapterName" + this.idSuffix}
|
<input id={"chapterName" + this.idSuffix}
|
||||||
className="sponsorTimeEdit sponsorTimeEditInput sponsorChapterNameInput"
|
className="sponsorTimeEdit sponsorTimeEditInput sponsorChapterNameInput"
|
||||||
style={{color: "inherit", backgroundColor: "inherit"}}
|
style={{color: "inherit", backgroundColor: "inherit", borderColor}}
|
||||||
ref={this.descriptionOptionRef}
|
ref={this.descriptionOptionRef}
|
||||||
type="text"
|
type="text"
|
||||||
value={this.state.description}
|
value={this.state.description}
|
||||||
|
|||||||
@@ -23,6 +23,12 @@ export function CategoryChooserComponent() {
|
|||||||
|
|
||||||
updateChannelList(setChannelListText, selectedConfigurationID!);
|
updateChannelList(setChannelListText, selectedConfigurationID!);
|
||||||
setSelections(getConfigurationValue<CategorySelection[]>(selectedConfigurationID, "categorySelections"));
|
setSelections(getConfigurationValue<CategorySelection[]>(selectedConfigurationID, "categorySelections"));
|
||||||
|
|
||||||
|
if (selectedConfigurationID === null) {
|
||||||
|
document.querySelectorAll(".hide-when-skip-profile").forEach((e) => e.classList.remove("hidden"));
|
||||||
|
} else {
|
||||||
|
document.querySelectorAll(".hide-when-skip-profile").forEach((e) => e.classList.add("hidden"));
|
||||||
|
}
|
||||||
}, [selectedConfigurationID]);
|
}, [selectedConfigurationID]);
|
||||||
|
|
||||||
const createNewConfig = () => {
|
const createNewConfig = () => {
|
||||||
@@ -145,6 +151,10 @@ export function CategoryChooserComponent() {
|
|||||||
}
|
}
|
||||||
forceUpdateConfigurationIDs();
|
forceUpdateConfigurationIDs();
|
||||||
|
|
||||||
|
if (Config.local.skipProfileTemp && Config.local.skipProfileTemp.configID === selectedConfigurationID) {
|
||||||
|
Config.local.skipProfileTemp = null;
|
||||||
|
}
|
||||||
|
|
||||||
setConfigurations(Config.local!.skipProfiles);
|
setConfigurations(Config.local!.skipProfiles);
|
||||||
const newID = Object.keys(Config.local!.skipProfiles)[0] as ConfigurationID;
|
const newID = Object.keys(Config.local!.skipProfiles)[0] as ConfigurationID;
|
||||||
setSelectedConfigurationID(newID);
|
setSelectedConfigurationID(newID);
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ function TimeSavedMessage({ viewCount, minutesSaved }: { viewCount: number; minu
|
|||||||
|
|
||||||
function DonateMessage(props: { onClose: () => void }): JSX.Element {
|
function DonateMessage(props: { onClose: () => void }): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<div id="sponsorTimesDonateContainer" style={{ alignItems: "center", justifyContent: "center" }}>
|
<div id="sponsorTimesDonateContainer" style={{ alignItems: "center", justifyContent: "center", display: "flex" }}>
|
||||||
<img className="sbHeart" src="/icons/heart.svg" alt="Heart icon" />
|
<img className="sbHeart" src="/icons/heart.svg" alt="Heart icon" />
|
||||||
<a id="sbConsiderDonateLink" href="https://sponsor.ajay.app/donate" target="_blank" rel="noreferrer" onClick={() => {
|
<a id="sbConsiderDonateLink" href="https://sponsor.ajay.app/donate" target="_blank" rel="noreferrer" onClick={() => {
|
||||||
Config.config.donateClicked = Config.config.donateClicked + 1;
|
Config.config.donateClicked = Config.config.donateClicked + 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user