mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-12 14:37:23 +03:00
Merge branch 'master' of https://github.com/ajayyy/SponsorBlock into improvements
This commit is contained in:
@@ -35,15 +35,18 @@ class CategoryChooserComponent extends React.Component<CategoryChooserProps, Cat
|
||||
{chrome.i18n.getMessage("category")}
|
||||
</td>
|
||||
|
||||
<td id={"CategorySkipOption"}>
|
||||
<td id={"CategorySkipOption"}
|
||||
className="skipOption">
|
||||
{chrome.i18n.getMessage("skipOption")}
|
||||
</td>
|
||||
|
||||
<td id={"CategoryColorOption"}>
|
||||
<td id={"CategoryColorOption"}
|
||||
className="colorOption">
|
||||
{chrome.i18n.getMessage("seekBarColor")}
|
||||
</td>
|
||||
|
||||
<td id={"CategoryPreviewColorOption"}>
|
||||
<td id={"CategoryPreviewColorOption"}
|
||||
className="previewColorOption">
|
||||
{chrome.i18n.getMessage("previewColor")}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -24,8 +24,8 @@ class CategorySkipOptionsComponent extends React.Component<CategorySkipOptionsPr
|
||||
|
||||
// Setup state
|
||||
this.state = {
|
||||
color: props.defaultColor || Config.config.barTypes[this.props.category].color,
|
||||
previewColor: props.defaultPreviewColor || Config.config.barTypes["preview-" + this.props.category].color,
|
||||
color: props.defaultColor || Config.config.barTypes[this.props.category]?.color,
|
||||
previewColor: props.defaultPreviewColor || Config.config.barTypes["preview-" + this.props.category]?.color,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,8 @@ class CategorySkipOptionsComponent extends React.Component<CategorySkipOptionsPr
|
||||
{chrome.i18n.getMessage("category_" + this.props.category)}
|
||||
</td>
|
||||
|
||||
<td id={this.props.category + "SkipOption"}>
|
||||
<td id={this.props.category + "SkipOption"}
|
||||
className="skipOption">
|
||||
<select
|
||||
className="categoryOptionsSelector"
|
||||
defaultValue={defaultOption}
|
||||
@@ -68,7 +69,8 @@ class CategorySkipOptionsComponent extends React.Component<CategorySkipOptionsPr
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td id={this.props.category + "ColorOption"}>
|
||||
<td id={this.props.category + "ColorOption"}
|
||||
className="colorOption">
|
||||
<input
|
||||
className="categoryColorTextBox option-text-box"
|
||||
type="color"
|
||||
@@ -76,7 +78,8 @@ class CategorySkipOptionsComponent extends React.Component<CategorySkipOptionsPr
|
||||
value={this.state.color} />
|
||||
</td>
|
||||
|
||||
<td id={this.props.category + "PreviewColorOption"}>
|
||||
<td id={this.props.category + "PreviewColorOption"}
|
||||
className="previewColorOption">
|
||||
<input
|
||||
className="categoryColorTextBox option-text-box"
|
||||
type="color"
|
||||
|
||||
@@ -25,7 +25,8 @@ export interface NoticeProps {
|
||||
// Callback for when this is closed
|
||||
closeListener: () => void,
|
||||
|
||||
zIndex?: number
|
||||
zIndex?: number,
|
||||
style?: React.CSSProperties
|
||||
}
|
||||
|
||||
export interface NoticeState {
|
||||
@@ -81,7 +82,8 @@ class NoticeComponent extends React.Component<NoticeProps, NoticeState> {
|
||||
|
||||
render(): React.ReactElement {
|
||||
const noticeStyle: React.CSSProperties = {
|
||||
zIndex: this.props.zIndex || (1000 + this.amountOfPreviousNotices)
|
||||
zIndex: this.props.zIndex || (1000 + this.amountOfPreviousNotices),
|
||||
...(this.props.style ?? {})
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -135,9 +135,7 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
|
||||
}
|
||||
|
||||
render(): React.ReactElement {
|
||||
const noticeStyle: React.CSSProperties = {
|
||||
zIndex: 1500 + this.amountOfPreviousNotices
|
||||
}
|
||||
const noticeStyle: React.CSSProperties = { }
|
||||
if (this.contentContainer().onMobileYouTube) {
|
||||
noticeStyle.bottom = "4em";
|
||||
noticeStyle.transform = "scale(0.8) translate(10%, 10%)";
|
||||
@@ -155,6 +153,7 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
|
||||
timed={true}
|
||||
maxCountdownTime={this.state.maxCountdownTime}
|
||||
videoSpeed={() => this.contentContainer().v?.playbackRate}
|
||||
style={noticeStyle}
|
||||
ref={this.noticeRef}
|
||||
closeListener={() => this.closeListener()}
|
||||
smaller={this.props.smaller}
|
||||
|
||||
Reference in New Issue
Block a user