mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 13:07:05 +03:00
Make bigger buttons on mobile skip button
This commit is contained in:
@@ -294,6 +294,10 @@
|
|||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sponsorSkipNoticeCloseButton.biggerCloseButton {
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.sponsorSkipMessage {
|
.sponsorSkipMessage {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@@ -302,6 +306,7 @@
|
|||||||
margin-top: auto;
|
margin-top: auto;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
margin-bottom: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sponsorSkipInfo {
|
.sponsorSkipInfo {
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ export interface NoticeProps {
|
|||||||
|
|
||||||
zIndex?: number,
|
zIndex?: number,
|
||||||
style?: React.CSSProperties
|
style?: React.CSSProperties
|
||||||
|
biggerCloseButton?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface NoticeState {
|
export interface NoticeState {
|
||||||
@@ -151,7 +152,8 @@ class NoticeComponent extends React.Component<NoticeProps, NoticeState> {
|
|||||||
|
|
||||||
{/* Close button */}
|
{/* Close button */}
|
||||||
<img src={chrome.extension.getURL("icons/close.png")}
|
<img src={chrome.extension.getURL("icons/close.png")}
|
||||||
className="sponsorSkipObject sponsorSkipNoticeButton sponsorSkipNoticeCloseButton sponsorSkipNoticeRightButton"
|
className={"sponsorSkipObject sponsorSkipNoticeButton sponsorSkipNoticeCloseButton sponsorSkipNoticeRightButton"
|
||||||
|
+ (this.props.biggerCloseButton ? " biggerCloseButton" : "")}
|
||||||
onClick={() => this.close()}>
|
onClick={() => this.close()}>
|
||||||
</img>
|
</img>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -188,6 +188,7 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
|
|||||||
maxCountdownTime={this.state.maxCountdownTime}
|
maxCountdownTime={this.state.maxCountdownTime}
|
||||||
videoSpeed={() => this.contentContainer().v?.playbackRate}
|
videoSpeed={() => this.contentContainer().v?.playbackRate}
|
||||||
style={noticeStyle}
|
style={noticeStyle}
|
||||||
|
biggerCloseButton={this.contentContainer().onMobileYouTube}
|
||||||
ref={this.noticeRef}
|
ref={this.noticeRef}
|
||||||
closeListener={() => this.closeListener()}
|
closeListener={() => this.closeListener()}
|
||||||
smaller={this.state.smaller}
|
smaller={this.state.smaller}
|
||||||
@@ -350,13 +351,21 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
|
|||||||
if (this.state.showSkipButton && (this.segments.length > 1
|
if (this.state.showSkipButton && (this.segments.length > 1
|
||||||
|| getCategoryActionType(this.segments[0].category) !== CategoryActionType.POI
|
|| getCategoryActionType(this.segments[0].category) !== CategoryActionType.POI
|
||||||
|| this.props.unskipTime)) {
|
|| this.props.unskipTime)) {
|
||||||
|
|
||||||
|
const style: React.CSSProperties = {
|
||||||
|
marginLeft: "4px",
|
||||||
|
color: (this.state.actionState === SkipNoticeAction.Unskip) ? this.selectedColor : this.unselectedColor
|
||||||
|
};
|
||||||
|
if (this.contentContainer().onMobileYouTube) {
|
||||||
|
style.padding = "20px";
|
||||||
|
style.minWidth = "100px";
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span className="sponsorSkipNoticeUnskipSection">
|
<span className="sponsorSkipNoticeUnskipSection">
|
||||||
<button id={"sponsorSkipUnskipButton" + this.idSuffix}
|
<button id={"sponsorSkipUnskipButton" + this.idSuffix}
|
||||||
className="sponsorSkipObject sponsorSkipNoticeButton"
|
className="sponsorSkipObject sponsorSkipNoticeButton"
|
||||||
style={{marginLeft: "4px",
|
style={style}
|
||||||
color: (this.state.actionState === SkipNoticeAction.Unskip) ? this.selectedColor : this.unselectedColor
|
|
||||||
}}
|
|
||||||
onClick={() => this.prepAction(SkipNoticeAction.Unskip)}>
|
onClick={() => this.prepAction(SkipNoticeAction.Unskip)}>
|
||||||
{this.state.skipButtonText + (this.state.showKeybindHint ? " (" + Config.config.skipKeybind + ")" : "")}
|
{this.state.skipButtonText + (this.state.showKeybindHint ? " (" + Config.config.skipKeybind + ")" : "")}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user