Merge branch 'preview-fixes' into preview-features

This commit is contained in:
the1812 2023-04-15 16:32:59 +08:00
commit 69aedde6cf
30 changed files with 1182 additions and 410 deletions

View File

@ -1,90 +1,90 @@
@mixin set-color($name, $level: "") { @mixin set-color($name, $level: '') {
$length: str-length($level); $length: str-length($level);
@if $length == 1 or $length == 2 { @if $length == 1 or $length == 2 {
#{$name}: #{"#" + $level + $level + $level} !important; #{$name}: #{'#' + $level + $level + $level} !important;
} @else if $length == 3 or $length == 6 { } @else if $length == 3 or $length == 6 {
#{$name}: #{"#" + $level} !important; #{$name}: #{'#' + $level} !important;
} @else if $length == 0 { } @else if $length == 0 {
#{$name}: transparent !important; #{$name}: transparent !important;
} @else { } @else {
#{$name}: #{"#" + $level} !important; #{$name}: #{'#' + $level} !important;
} }
} }
@mixin set-theme-color($name, $level: "") { @mixin set-theme-color($name, $level: '') {
@if $level == "" { @if $level == '' {
#{$name}: var(--theme-color) !important; #{$name}: var(--theme-color) !important;
} @else { } @else {
#{$name}: var(--theme-color-#{$level}) !important; #{$name}: var(--theme-color-#{$level}) !important;
} }
} }
@mixin set-foreground-color($name, $level: "") { @mixin set-foreground-color($name, $level: '') {
@if $level == "" { @if $level == '' {
#{$name}: var(--foreground-color) !important; #{$name}: var(--foreground-color) !important;
} @else { } @else {
#{$name}: var(--foreground-color-#{$level}) !important; #{$name}: var(--foreground-color-#{$level}) !important;
} }
} }
@mixin background-color($level: "") { @mixin background-color($level: '') {
@include set-color("background-color", $level); @include set-color('background-color', $level);
} }
@mixin color($level: "") { @mixin color($level: '') {
@include set-color("color", $level); @include set-color('color', $level);
} }
@mixin background($level: "") { @mixin background($level: '') {
@include set-color("background", $level); @include set-color('background', $level);
} }
@mixin border-color($level: "") { @mixin border-color($level: '') {
@include set-color("border-color", $level); @include set-color('border-color', $level);
} }
@mixin fill($level: "") { @mixin fill($level: '') {
@include set-color("fill", $level); @include set-color('fill', $level);
} }
@mixin stroke($level: "") { @mixin stroke($level: '') {
@include set-color("stroke", $level); @include set-color('stroke', $level);
} }
@mixin theme-background-color($level: "") { @mixin theme-background-color($level: '') {
@include set-theme-color("background-color", $level); @include set-theme-color('background-color', $level);
} }
@mixin theme-color($level: "") { @mixin theme-color($level: '') {
@include set-theme-color("color", $level); @include set-theme-color('color', $level);
} }
@mixin theme-background($level: "") { @mixin theme-background($level: '') {
@include set-theme-color("background", $level); @include set-theme-color('background', $level);
} }
@mixin theme-border-color($level: "") { @mixin theme-border-color($level: '') {
@include set-theme-color("border-color", $level); @include set-theme-color('border-color', $level);
} }
@mixin theme-fill($level: "") { @mixin theme-fill($level: '') {
@include set-theme-color("fill", $level); @include set-theme-color('fill', $level);
} }
@mixin theme-stroke($level: "") { @mixin theme-stroke($level: '') {
@include set-theme-color("stroke", $level); @include set-theme-color('stroke', $level);
} }
$vip-color: "FB7299"; $vip-color: 'FB7299';
@mixin vip-color() { @mixin vip-color() {
@include set-color("color", $vip-color); @include set-color('color', $vip-color);
} }
@mixin vip-background-color() { @mixin vip-background-color() {
@include set-color("background-color", $vip-color); @include set-color('background-color', $vip-color);
} }
@mixin foreground-background-color($level: "") { @mixin foreground-background-color($level: '') {
@include set-foreground-color("background-color", $level); @include set-foreground-color('background-color', $level);
} }
@mixin foreground-color($level: "") { @mixin foreground-color($level: '') {
@include set-foreground-color("color", $level); @include set-foreground-color('color', $level);
} }
@mixin foreground-background($level: "") { @mixin foreground-background($level: '') {
@include set-foreground-color("background", $level); @include set-foreground-color('background', $level);
} }
@mixin foreground-border-color($level: "") { @mixin foreground-border-color($level: '') {
@include set-foreground-color("border-color", $level); @include set-foreground-color('border-color', $level);
} }
@mixin foreground-fill($level: "") { @mixin foreground-fill($level: '') {
@include set-foreground-color("fill", $level); @include set-foreground-color('fill', $level);
} }
@mixin to-white { @mixin to-white {
@ -123,16 +123,13 @@ $vip-color: "FB7299";
} }
} }
@mixin back-top-btn( @mixin back-top-btn($btn-selector: '.back-top-btn', $arrow-selector: '.arrow-icon') {
$btn-selector: ".back-top-btn",
$arrow-selector: ".arrow-icon"
) {
#{$btn-selector} { #{$btn-selector} {
@include border-color(); @include border-color();
@include background-color("3"); @include background-color('3');
@if $arrow-selector { @if $arrow-selector {
#{$arrow-selector} { #{$arrow-selector} {
@include color("a"); @include color('a');
} }
} }
&:hover { &:hover {
@ -145,3 +142,6 @@ $vip-color: "FB7299";
} }
} }
} }
@function contains($class) {
@return "[class*='#{$class}']";
}

View File

@ -1,4 +1,5 @@
@import './dark-definitions'; @import './dark-definitions';
@import 'common';
#disable-popup-modal, #disable-popup-modal,
#vip-exchange-modal { #vip-exchange-modal {
@ -48,13 +49,18 @@
.danmaku-wrap .player-auxiliary-area .player-auxiliary-danmaku-wrap .bscroll-indicator { .danmaku-wrap .player-auxiliary-area .player-auxiliary-danmaku-wrap .bscroll-indicator {
@include background-color('5'); @include background-color('5');
} }
.bpx-player-auxiliary .bpx-player-dm-wrap,
.player-auxiliary-area .player-auxiliary-bscrollbar { .player-auxiliary-area .player-auxiliary-bscrollbar {
.bscroll-vertical-scrollbar, .bscroll-vertical-scrollbar,
.bscroll-vertical-scrollbar.mousedown, .bscroll-vertical-scrollbar.mousedown,
&:hover .bscroll-vertical-scrollbar { &:hover .bscroll-vertical-scrollbar {
@include background-color(); @include background-color();
} }
.bscroll-indicator {
@include background-color('5');
}
} }
.bpx-player-auxiliary .bpx-player-dm-wrap,
.danmaku-wrap .player-auxiliary-area .player-auxiliary-danmaku-wrap { .danmaku-wrap .player-auxiliary-area .player-auxiliary-danmaku-wrap {
.bscroll-vertical-scrollbar.mousedown, .bscroll-vertical-scrollbar.mousedown,
&:hover .bscroll-vertical-scrollbar { &:hover .bscroll-vertical-scrollbar {
@ -305,8 +311,6 @@ blockquote {
& .link-navbar { & .link-navbar {
@include background-color('3'); @include background-color('3');
} }
.calendar-checkin .calendar-wrapper,
.download-panel-ctnr,
.nav-item, .nav-item,
.nav-item .area-list-panel .list-item, .nav-item .area-list-panel .list-item,
.nav-logo, .nav-logo,
@ -316,16 +320,9 @@ blockquote {
@include color('e'); @include color('e');
} }
.link-panel-ctnr .ps__thumb-x, .link-panel-ctnr .ps__thumb-x,
.link-panel-ctnr .ps__thumb-y, .link-panel-ctnr .ps__thumb-y {
.nav-item:hover,
.shortcuts-ctnr .shortcut-item:not(:last-child):hover {
@include background-color('4'); @include background-color('4');
} }
.calendar-checkin,
.calendar-checkin .calendar-wrapper,
.calendar-checkin .title,
.download-panel-ctnr,
.link-panel-ctnr,
.link-panel-ctnr .totally-empty-hint, .link-panel-ctnr .totally-empty-hint,
.nav-item .area-list-panel, .nav-item .area-list-panel,
.user-panel-ctnr .user-panel, .user-panel-ctnr .user-panel,
@ -344,3 +341,228 @@ blockquote {
} }
} }
} }
.link-navbar-wrap,
.link-navbar-ctnr {
.link-navbar {
@include background-color('2');
box-shadow: inset 0 -1px #333 !important;
}
.shortcut-item .list-item:hover {
@include background-color();
}
.link-navbar .main-ctnr .nav-item .area-list-panel {
@include background-color('2');
@include border-color('3');
.list-item:hover {
@include background-color('4');
}
}
.showmore-link {
.more-label-text {
@include color('e');
}
.down-arrow-icon-block .down-arrow {
@include to-white();
}
.more-tab-content {
@include background-color('2');
@include border-color('3');
.waterfall-item:hover {
@include background-color('4');
}
}
}
.list-item .startlive-btn {
span {
@include color('e');
}
}
}
.search-bar-ctnr {
.search-bar.search-bar {
@include no-shadow();
&:hover {
@include background-color();
}
}
#nav-searchform {
@include background-color();
@include border-color('3');
&.is-actived,
&.is-focus {
.nav-search-content {
@include background-color('4');
}
}
}
.nav-search-clean path {
@include fill('a');
}
.search-btn {
&:hover {
@include background-color('4');
}
.search-icon {
@include to-white();
}
}
.search-pannel {
@include background-color('2');
.header {
.title {
@include color('e');
}
.clear {
@include color('a');
}
}
.histories {
.history-item {
@include background-color('3');
@include color('e');
}
}
.history-fold-wrap {
.fold-text {
@include color('a');
}
.fold-icon {
@include fill('a');
}
&:hover {
.fold-text {
@include theme-color();
}
.fold-icon {
@include theme-fill();
}
}
}
.trending {
.trending-item {
&.active,
&:focus,
&:hover {
@include background-color('3');
}
.trendings-rank {
@include color('a');
&.search-rank-top {
@include color('e');
}
}
.trending-text {
@include color('e');
}
}
}
}
}
.user-panel-ctnr {
.user-panel {
@include border-color('3');
@include background-color('2');
.level-progress {
@include background-color('3');
}
.user-level {
@include theme-color();
}
.section-block {
@include background-color();
}
.battery-content {
@include color('e');
}
.pay-button {
@include theme-background-color();
@include foreground-color();
}
.content-ctnr {
.control-block {
&:hover {
@include background-color('4');
}
}
.ctrl-btn {
@include color('e');
.icon {
@include to-white();
}
}
.cut-line {
@include border-color('4');
}
.loginout-btn {
@include color('e');
.login-out-icon {
@include to-white();
}
}
}
}
}
.link-panel-ctnr {
@include background-color('2');
@include border-color('3');
@include color('e');
.load-more-btn {
@include background-color();
@include color('e');
&:hover {
@include background-color('4');
}
}
}
.calendar-checkin {
@include background-color('2');
@include border-color('3');
@include color('e');
.divider {
@include background-color('3');
}
.title {
@include background-color();
}
.calendar-wrapper {
@include background-color();
}
.checkin-btn {
@include background-color();
@include color('e');
&:hover {
@include background-color('4');
}
}
}
.download-panel-ctnr {
@include background-color('2');
@include border-color('3');
@include color('e');
.content-ctnr {
.title {
@include color('e');
}
.item {
.name,
.light-name {
@include color('e');
}
.desc {
@include color('a');
}
.download-link {
@include color('a');
&:hover {
@include theme-color();
}
}
&:hover {
.light-name {
@include theme-color();
}
}
}
}
}

View File

@ -15,5 +15,6 @@
@import "./dark-slice-15.scss"; @import "./dark-slice-15.scss";
@import "./dark-slice-16.scss"; @import "./dark-slice-16.scss";
@import "./dark-slice-17.scss"; @import "./dark-slice-17.scss";
@import "./dark-slice-18.scss";
@import "./dark-navbar.scss"; @import "./dark-navbar.scss";
@import "./dark-variables.scss"; @import "./dark-variables.scss";

View File

@ -1,11 +1,6 @@
@import "./dark-definitions"; @import "./dark-definitions";
.bili-header-m .nav-menu .nav-con .nav-item:hover,
.right-part > .shortcuts-ctnr .shortcut-item:hover,
#link-navbar-vm > .link-navbar .nav-item:hover,
.z_top .z_top_nav ul li:hover, .z_top .z_top_nav ul li:hover,
.uns_box ul.menu li:not(.b-post):hover, .uns_box ul.menu li:not(.b-post):hover,
.link-navbar .nav-item:hover,
.shortcuts-ctnr .shortcut-item:hover,
.search-bar-ctnr .search-bar, .search-bar-ctnr .search-bar,
.nav-header-wrapper .nav-header .nav-header-search-bar { .nav-header-wrapper .nav-header .nav-header-search-bar {
@include background-color("2"); @include background-color("2");
@ -43,17 +38,13 @@
} }
.bili-header-m .nav-menu .nav-con .nav-item .t, .bili-header-m .nav-menu .nav-con .nav-item .t,
#link-navbar-vm > .link-navbar .main-ctnr .nav-logo, #link-navbar-vm > .link-navbar .main-ctnr .nav-logo,
#link-navbar-vm > .link-navbar .nav-item:hover,
.right-part > .shortcuts-ctnr, .right-part > .shortcuts-ctnr,
.right-part > .shortcuts-ctnr .shortcut-item:hover,
.z_top.b-header-blur .z_top_nav li a.i-link, .z_top.b-header-blur .z_top_nav li a.i-link,
.z_top.b-header-blur .uns_box li.u-i a.i-link, .z_top.b-header-blur .uns_box li.u-i a.i-link,
.z_top a, .z_top a,
.my-link-btn .label, .my-link-btn .label,
.uns_box li.u-i a.i-link, .uns_box li.u-i a.i-link,
.shortcuts-ctnr .shortcut-item,
.link-navbar .main-ctnr .custom-link > a, .link-navbar .main-ctnr .custom-link > a,
.shortcut-item .list-item span,
.link-navbar .main-ctnr .nav-logo, .link-navbar .main-ctnr .nav-logo,
.search-bar-ctnr .search-bar input, .search-bar-ctnr .search-bar input,
.nav-header-wrapper .nav-header .nav-header-search-bar { .nav-header-wrapper .nav-header .nav-header-search-bar {

View File

@ -147,8 +147,9 @@
} }
.gift-item.buy { .gift-item.buy {
&.hover, &.hover,
&.hover-item,
&:hover { &:hover {
@include background-color("2"); @include background-color("3");
} }
} }
.cntr { .cntr {

File diff suppressed because it is too large Load Diff

View File

@ -218,6 +218,11 @@
.bpx-player-dm-switch { .bpx-player-dm-switch {
@include fill('a'); @include fill('a');
} }
.bui-danmaku-switch-on {
path:last-child {
@include theme-fill();
}
}
.bpx-player-dm-switch:hover, .bpx-player-dm-switch:hover,
.bpx-player-dm-setting:hover, .bpx-player-dm-setting:hover,
.bpx-player-video-btn-dm:hover { .bpx-player-video-btn-dm:hover {

View File

@ -62,15 +62,15 @@
} }
} }
.bili-dyn-publishing { .bili-dyn-publishing {
z-index: 1; // 下面的 to-theme filter 会改变层级, 这里修复一下
@include dyn-container-skeleton(); @include dyn-container-skeleton();
@include background-color('4'); @include background-color('4');
&__tools { &__tools {
&__item { &__item {
&.active, // 这里用 filter 会导致弹窗内容也被影响, 暂时先去掉了
&:hover { // &.active,
@include to-theme('blue'); // &:hover {
} // @include to-theme('blue');
// }
&.emoji { &.emoji {
@include background-color(); @include background-color();
} }
@ -244,6 +244,7 @@
@include color('e'); @include color('e');
} }
&__desc, &__desc,
&__text,
&__stat { &__stat {
@include color('a'); @include color('a');
} }
@ -506,6 +507,11 @@
} }
} }
} }
.dyn-card-opus {
&__title {
@include color('e');
}
}
} }
.bili-dyn-report { .bili-dyn-report {
@include background-color('3'); @include background-color('3');

View File

@ -744,7 +744,7 @@
.player-auxiliary-danmaku-multiple-control { .player-auxiliary-danmaku-multiple-control {
@include background-color('2'); @include background-color('2');
} }
[class*='player-auxiliary-danmaku-btn-'] { #{contains('player-auxiliary-danmaku-btn-')} {
@include background-color(); @include background-color();
} }
} }
@ -902,44 +902,44 @@
@include theme-fill(); @include theme-fill();
} }
[class*='numberListItem_number_list_item'] { #{contains('numberListItem_number_list_item')} {
@include background-color('5'); @include background-color('5');
@include border-color(); @include border-color();
&:hover { &:hover {
@include theme-border-color(); @include theme-border-color();
} }
&[class*='numberListItem_select'] { &#{contains('numberListItem_select')} {
@include theme-border-color(); @include theme-border-color();
[class*='numberListItem_title'] { #{contains('numberListItem_title')} {
@include theme-color(); @include theme-color();
} }
} }
} }
[class*='review_review_module'] { #{contains('review_review_module')} {
@include border-color('4'); @include border-color('4');
[class*='review_review_item_fill'] { #{contains('review_review_item_fill')} {
@include background-color('4'); @include background-color('4');
} }
[class*='review_module_title'], #{contains('review_module_title')},
[class*='review_review_title'] { #{contains('review_review_title')} {
@include color('e'); @include color('e');
} }
[class*='review_review_author'] { #{contains('review_review_author')} {
@include color('e'); @include color('e');
&[class*='review_is-vip'] { &#{contains('review_is-vip')} {
@include vip-color(); @include vip-color();
} }
} }
[class*='review_review_content'] { #{contains('review_review_content')} {
@include color('a'); @include color('a');
} }
} }
[class*='epitem_ep_item'] { #{contains('epitem_ep_item')} {
&:hover { &:hover {
@include background-color('5'); @include background-color('5');
} }
@ -951,7 +951,7 @@
} }
} }
&[class*='epitem_cursor'] { &#{contains('epitem_cursor')} {
@include background-color('5'); @include background-color('5');
path { path {
@include theme-fill(); @include theme-fill();
@ -959,69 +959,132 @@
} }
} }
[class*='seasonlist_season_list'] { #{contains('seasonlist_season_list')} {
[class*='seasonlist_ss_title'] { #{contains('seasonlist_ss_title')} {
@include color('e'); @include color('e');
} }
[class*='seasonlist_expand_more'] { #{contains('seasonlist_expand_more')} {
@include background-color('4'); @include background-color('4');
@include color('e'); @include color('e');
} }
} }
[class*='mediainfo_media_info'] { #{contains('mediainfo_media_info')} {
@include border-color('4'); @include border-color('4');
[class*='mediainfo_media_desc'] { #{contains('mediainfo_media_desc')} {
&, &,
& i { & i {
@include color('e'); @include color('e');
} }
} }
[class*='mediainfo_media_title'] { #{contains('mediainfo_media_title')} {
@include color('e'); @include color('e');
} }
[class*='mediainfo_av_link'], #{contains('mediainfo_av_link')},
[class*='mediainfo_home_link'], #{contains('mediainfo_home_link')},
[class*='mediainfo_media_pub'] { #{contains('mediainfo_media_pub')} {
@include color('a'); @include color('a');
} }
[class*='mediainfo_ellipsis'], #{contains('mediainfo_ellipsis')},
[class*='mediainfo_media_desc'] i { #{contains('mediainfo_media_desc')} i {
@include background(); @include background();
@include theme-color(); @include theme-color();
} }
} }
[class*='section_ep_section_module'] { #{contains('section_ep_section_module')} {
@include background-color('4'); @include background-color('4');
[class*='section_section_title'] { #{contains('section_section_title')} {
@include color('e'); @include color('e');
} }
} }
[class*='RecommendItem_wrap'] { #{contains('RecommendItem_wrap')} {
[class*='RecommendItem_title'] { #{contains('RecommendItem_title')} {
@include color('e'); @include color('e');
} }
} }
[class*='eplist_ep_list_wrapper'] { #{contains('eplist_ep_list_wrapper')} {
@include background-color('4'); @include background-color('4');
[class*='eplist_list_title'] [class*='eplist_left_wrap'] h4 { #{contains('eplist_list_title')} #{contains('eplist_left_wrap')} h4 {
@include color('e'); @include color('e');
} }
[class*='numberListItem_title'] { #{contains('numberListItem_title')} {
@include color('e'); @include color('e');
} }
#{contains('eplist_ep_list_order')} {
@include to-theme('blue');
}
#{contains('longListItem_wrap')} {
@include color('e');
&:hover {
@include background-color('5');
#{contains('longListItem_text')} {
@include theme-color();
}
}
&#{contains('longListItem_select')} {
@include background-color('5');
}
#{contains('longListItem_icon')} {
path {
@include theme-fill();
}
}
}
#{contains('modeChangeBtn_icon')} {
path {
@include fill('a');
}
&:hover path {
@include theme-fill();
}
}
} }
[class*='operation_split_line'] { #{contains('operation_split_line')} {
@include border-color('4'); @include border-color('4');
} }
[class*='mediainfo_btn_rating'] { #{contains('mediainfo_btn_rating')} {
@include background-color(); @include background-color();
} }
[class*='DanmukuBox_wrap'] { #{contains('DanmukuBox_wrap')} {
@include background(); @include background();
} }
#{contains('paybar_pay_bar')} {
#{contains('paybar_btn_pay')} {
@include border-color();
@include theme-background-color();
@include foreground-color();
&#{contains('paybar_active')} {
@include background-color('4');
@include color('e');
}
}
}
.player-left-components {
#{contains('toolbar_toolbar')} {
#{contains('toolbar_item_info')} {
#{contains('toolbar_icon')} path {
@include fill('a');
}
#{contains('toolbar_counts_num')} {
@include color('a');
}
&#{contains('toolbar_active')},
&:hover {
#{contains('toolbar_icon')}path {
@include theme-fill();
}
#{contains('toolbar_counts_num')} {
@include theme-color();
}
}
}
}
}
.b-img {
@include background-color('3');
}

View File

@ -0,0 +1,455 @@
@import './dark-definitions';
@import 'common';
#{contains('mediainfo_media_toolbar')} {
#{contains('mediainfo_btn_rating')} {
@include color('a');
@include border-color('4');
}
#{contains('mediainfo_btn_follow')} {
&#{contains('mediainfo_follow_active')}#ogv-weslie-media-info-follow {
@include background-color('4');
@include color('a');
}
}
#{contains('mediainfo_follow_options_list')} {
@include background-color('3');
@include border-color();
li {
@include color('e');
&#{contains('mediainfo_disabled')} {
@include color('6');
}
&:hover {
@include background-color('5');
}
}
}
}
#{contains('upinfo_up_info')} {
#{contains('upinfo_btn_follow_up')} {
@include theme-color();
}
}
#{contains('seasonlist_ss_badge')} {
&#{contains('seasonlist_blue')} {
@include theme-background-color();
}
}
#{contains('navTools_wrap')} {
#{contains('navTools_item')} {
@include background-color('3');
@include border-color('4');
@include color('a');
path {
@include fill('a');
}
&:hover {
@include theme-background-color();
@include border-color();
@include foreground-color();
path {
@include foreground-fill();
}
}
}
}
#{contains('toolbar_watch_more')} {
@include background-color('3');
@include border-color('4');
@include no-shadow();
#{contains('toolbar_title')} {
@include color('e');
}
}
#{contains('toolbar_mobile_more')} {
@include background-color('3');
@include border-color('4');
@include no-shadow();
#{contains('toolbar_video_title')} {
@include color('e');
}
#{contains('toolbar_mobile_tip')} {
@include color('a');
#{contains('toolbar_mobile_link')} {
@include theme-color();
}
}
// 二维码需要加个边框才能识别
canvas {
padding: 4px;
background-color: #fff;
}
}
#{contains('toolbar_share_more')} {
@include background-color('3');
@include border-color('4');
@include no-shadow();
#{contains('toolbar_share_desc')} {
@include color('e');
}
#{contains('toolbar_share_btn')} {
&:hover {
#{contains('toolbar_share_desc')} {
@include theme-color();
}
}
&:not(#share_tieba) {
svg {
circle {
@include fill('e');
// 这一排图标只有贴吧是做了减去顶层的... 其他的只能填个和背景相同的颜色假装是挖空的效果
~ path {
@include fill('3');
}
}
}
&:hover {
circle {
@include theme-fill();
}
}
}
}
#share_tieba {
path {
@include fill('e');
}
&:hover path {
@include theme-fill();
}
}
}
#{contains('dialogcoin_coin_operated')} {
@include background-color('3');
#{contains('dialogcoin_icon_close')} {
path {
@include fill('a');
}
}
#{contains('dialogcoin_coin_title')} {
@include color('e');
span {
@include theme-color();
}
}
#{contains('dialogcoin_like_checkbox')} {
@include color('e');
input[type='checkbox']:checked + i {
@include to-theme('blue');
}
}
#{contains('dialogcoin_coin_btn')} {
@include theme-background-color();
@include border-color();
@include foreground-color();
&:hover {
@include theme-background-color('90');
}
}
#{contains('dialogcoin_tips')} {
@include color('a');
}
}
.action-list-container {
@include background-color('4');
.action-list-header {
&:hover {
@include background-color();
}
.list-title {
@include color('e');
}
.list-count {
@include color('a');
}
.list-tool-btn {
&-icon {
@include color('a');
}
&:hover .list-tool-btn-icon {
@include theme-color();
}
}
.list-expand-btn {
&-icon {
@include color('e');
}
}
}
.list-display-name {
@include color('a');
&:hover {
@include theme-color();
}
}
.split-line {
@include background-color('5');
}
.actionlist-item-inner {
.main {
.cover {
@include background-color('3');
.b-img {
@include background-color();
}
}
.info {
.views {
@include color('a');
}
}
.del-btn {
@include color('a');
&:hover {
@include theme-color();
}
}
}
&.siglep-active {
.title {
.playing-gif {
@include to-theme('blue');
}
}
}
}
}
.recommend-list-container .rec-footer {
@include background-color('3');
@include color('e');
}
.recommend-video-card {
.info {
.upname {
@include color('a');
&:hover {
@include theme-color();
}
}
.playinfo {
@include color('a');
}
}
}
.video-tag-container {
.tag-panel {
@include background-color();
.tag-link {
@include background-color('3');
@include color('e');
}
.show-more-btn {
@include background-color('3');
@include color('e');
&:hover {
@include theme-color();
}
}
}
}
.detail-channel-popup {
.channel-info {
.channel-desc {
@include color('a');
}
}
.channel-entry-btn {
@include theme-color();
&:hover {
@include foreground-color();
}
}
.toggle-sub-btn {
&.no-sub:hover {
@include border-color();
@include theme-background-color();
}
}
}
.playlist-comment {
.comment-container {
@include background-color();
}
}
.video-info-container {
.video-title {
&:hover {
@include theme-color();
}
}
.video-info-detail {
@include color('a');
&-list {
.item path {
@include fill('a');
}
}
}
}
.video-toolbar-left-item {
@include color('a');
&:hover,
&.on {
@include theme-color();
}
}
.video-toolbar-right-item:not(.dropdown-item) {
@include color('a');
&:hover {
@include theme-color();
}
}
.video-tool-more-popover {
@include background-color('3');
.video-tool-more-dropdown {
.dropdown-item {
@include color('e');
&:hover {
@include background-color('4');
}
.video-toolbar-item-icon {
@include color('e');
}
}
}
}
.playlist-container--right {
.up-detail .up-description {
@include color('a');
}
}
.upinfo-btn-panel .new-charge-btn {
@include background-color('4');
@include color('e');
&.charge-btn-loaded {
@include background-color();
@include theme-color();
&:hover {
@include theme-background-color('20');
}
}
}
.magic-adventures .magic-adventures-text {
@include color('e');
}
.gift-panel {
.gift-item {
.gift-label {
@include color('e');
}
.panel-price {
@include color('a');
}
}
}
.gift-sender-panel {
.content {
@include background-color('2');
}
.feed-bar-section {
@include background-color('4');
@include border-color('4');
}
}
.gift-control-panel {
.vertical-separator {
@include border-color('5');
}
.m-guard-ent,
.m-recharge-ent {
&:hover {
@include background-color('3');
}
.guard-info,
.balance-info {
.title {
@include color('a');
}
.guard-ent-info,
.recharge-ent-info {
@include color('e');
}
.right-arrow {
@include border-color('e');
}
}
}
}
.gift-presets {
.gift-panel-switch {
@include background-color('3');
.arrow {
@include border-color('e');
}
}
}
.gift-package-btn {
@include color('e');
&:hover {
@include background-color('8884');
}
}
.gift-package {
@include color('e');
.gift-item-asset {
.b-img {
@include background-color();
}
}
.bag-icon {
@include border-color('e');
}
&:hover {
@include background-color('8884');
}
.silver-wallet {
@include background-color('3');
@include color('e');
}
.gift-item-wrap {
.gift-item {
&.free:hover {
@include background-color('3');
}
}
.num {
@include color('e');
}
}
.des {
@include color('a');
}
}
.room-introduction-tag {
.icon-label {
@include color('e');
}
}
.members-info-container {
.header {
@include background-color('4');
.staff-amt {
@include color('a');
}
.fold-btn path {
@include fill('e');
}
}
.container {
@include background-color();
.staff-info {
.staff-name {
@include color('e');
&.is-vip {
@include vip-color();
}
}
.info-tag {
@include color('a');
}
}
}
}

View File

@ -13,4 +13,5 @@ export const darkExcludes = [
'/york/allowance-charge', '/york/allowance-charge',
// 创作中心-收益管理-悬赏计划 // 创作中心-收益管理-悬赏计划
'//cm.bilibili.com/quests/#/task', '//cm.bilibili.com/quests/#/task',
'//live.bilibili.com/activity/live-activity-full/full-next/index.html',
] ]

View File

@ -155,8 +155,6 @@ div.con,
.base-bubble, .base-bubble,
.base-bubble .content-ctnr:before, .base-bubble .content-ctnr:before,
.attention-btn-ctnr .right-part, .attention-btn-ctnr .right-part,
.gift-item.buy.hover,
.gift-presets .gift-panel-switch,
.chat-history-panel .chat-history-list .chat-item.system-msg, .chat-history-panel .chat-history-list .chat-item.system-msg,
.bilibili-live-player-loading-panel, .bilibili-live-player-loading-panel,
.guard-rank-cntr .rank-cntr .btn-box .buy:hover, .guard-rank-cntr .rank-cntr .btn-box .buy:hover,
@ -168,11 +166,9 @@ div.con,
.rank.rank-9, .rank.rank-9,
.rank.rank-10, .rank.rank-10,
.result, .result,
.user-panel .level-progress,
.download-panel-ctnr .download-item:hover, .download-panel-ctnr .download-item:hover,
.user-item-loading .username, .user-item-loading .username,
.user-item-loading .avatar, .user-item-loading .avatar,
.calendar-checkin .checkin-btn:active,
.user-panel .logout-btn:active, .user-panel .logout-btn:active,
.user-level-detail .detail-link:hover, .user-level-detail .detail-link:hover,
.user-level-detail .detail-link:active, .user-level-detail .detail-link:active,
@ -198,7 +194,6 @@ div.con,
.voted-result, .voted-result,
.info-model, .info-model,
.app-watch, .app-watch,
#app .header,
#app .submit, #app .submit,
.appeal-box, .appeal-box,
.fans-medal-item:not(.medal-guard) .fans-medal-level, .fans-medal-item:not(.medal-guard) .fans-medal-level,
@ -378,17 +373,9 @@ button.submit-button.disabled,
.rank-list-ctnr .own, .rank-list-ctnr .own,
.rank-cntr .item.own, .rank-cntr .item.own,
.area-list-panel, .area-list-panel,
.user-panel-ctnr .user-panel .lens-ctnr,
.calendar-checkin .title,
.calendar-checkin .calendar-wrapper,
.calendar-checkin .content-ctnr.ie-fix, .calendar-checkin .content-ctnr.ie-fix,
.calendar-checkin,
.calendar-checkin .checkin-btn,
.calendar-checkin:hover,
.calendar-checkin .checkin-rewards, .calendar-checkin .checkin-rewards,
.calendar-checkin .checkin-rewards .query, .calendar-checkin .checkin-rewards .query,
.download-panel-ctnr,
.link-panel-ctnr,
.totally-empty-hint, .totally-empty-hint,
.load-more-btn, .load-more-btn,
.load-error-panel, .load-error-panel,
@ -469,7 +456,6 @@ body,
.wrapper.clearfix .content, .wrapper.clearfix .content,
.right-part .user-panel, .right-part .user-panel,
.side-bar-cntr, .side-bar-cntr,
.shortcut-item .list-item:hover,
.divider, .divider,
.fjw-point .line, .fjw-point .line,
font>span, font>span,
@ -665,7 +651,6 @@ div.drag-bar,
.rank-cntr .tip, .rank-cntr .tip,
.chat-item.danmaku-item .user-name, .chat-item.danmaku-item .user-name,
.section-title h2, .section-title h2,
.user-panel .ctrl-btn,
.lightgray, .lightgray,
.gift-info-expScore, .gift-info-expScore,
.gift-info-desc, .gift-info-desc,
@ -1022,9 +1007,7 @@ div.con header,
.rank-list-ctnr .normal-list .item, .rank-list-ctnr .normal-list .item,
.config-row, .config-row,
.calendar-checkin .calendar-wrapper, .calendar-checkin .calendar-wrapper,
.calendar-checkin .checkin-btn,
.download-panel-ctnr a, .download-panel-ctnr a,
.link-panel-ctnr,
.load-more-btn, .load-more-btn,
.user-panel .logout-btn, .user-panel .logout-btn,
.darkgray, .darkgray,
@ -1083,8 +1066,7 @@ font,
li.tag, li.tag,
li.tag > a, li.tag > a,
#app .container, #app .container,
#app .submit .cancel, #app .submit .cancel
#app .header
{ {
color: #eee !important; color: #eee !important;
} }
@ -1283,12 +1265,10 @@ div.bar>div.num,
.left-container .head-info-section, .left-container .head-info-section,
.left-container .gift-control-section, .left-container .gift-control-section,
.attention-btn-ctnr .right-part, .attention-btn-ctnr .right-part,
.gift-presets .gift-panel-switch,
.rank-list-ctnr .tabs .item, .rank-list-ctnr .tabs .item,
.chat-history-panel .chat-history-list .chat-item.system-msg, .chat-history-panel .chat-history-list .chat-item.system-msg,
.guard-rank-cntr .rank-cntr .btn-box, .guard-rank-cntr .rank-cntr .btn-box,
.prize-item .prize-img, .prize-item .prize-img,
.calendar-checkin .divider,
.info-item-ctnr, .info-item-ctnr,
.user-level-detail, .user-level-detail,
.user-level-detail hr, .user-level-detail hr,
@ -1313,7 +1293,6 @@ div.bar>div.num,
.fjw-case-detail .ban-detail .content-box .jury-status, .fjw-case-detail .ban-detail .content-box .jury-status,
.app-watch, .app-watch,
.app-watch .title, .app-watch .title,
#app .header,
.iScrollIndicator, .iScrollIndicator,
#app .submit, #app .submit,
#app .submit .cancel, #app .submit .cancel,
@ -1483,8 +1462,7 @@ img[src^='//static.hdslb.com/images/base'],
.filter-wrap .fold .arrow-down, .filter-wrap .fold .arrow-down,
.filter-wrap .fold .arrow-up, .filter-wrap .fold .arrow-up,
.fixed-top .search-block .search-loupe .icon-loupe, .fixed-top .search-block .search-loupe .icon-loupe,
.link-footer .footer-linker .footer-linker-bili .logo, .link-footer .footer-linker .footer-linker-bili .logo
.gift-presets .gift-panel-switch>.arrow
{ {
filter: brightness(0) invert(1) !important; filter: brightness(0) invert(1) !important;
} }
@ -1952,7 +1930,6 @@ a.s-btn:hover,
.hour-rank, .hour-rank,
.attention-btn-ctnr .left-part, .attention-btn-ctnr .left-part,
.gift-item .corner-mark, .gift-item .corner-mark,
.gift-package,
.rank.rank-1, .rank.rank-1,
.rank.rank-2, .rank.rank-2,
.rank.rank-3, .rank.rank-3,
@ -2166,16 +2143,12 @@ a.up-name:hover,
.chat-item.danmaku-item .danmaku-content:hover, .chat-item.danmaku-item .danmaku-content:hover,
.guard-rank-cntr .rank-cntr .btn-box .buy, .guard-rank-cntr .rank-cntr .btn-box .buy,
.clock-time, .clock-time,
.user-panel .user-level,
.calendar-checkin .title .month:hover, .calendar-checkin .title .month:hover,
.calendar-checkin .checkin-rewards .query:hover, .calendar-checkin .checkin-rewards .query:hover,
.calendar-checkin .checkin-btn:hover,
.download-panel-ctnr .download-item:hover, .download-panel-ctnr .download-item:hover,
.info-ctnr .time .blue, .info-ctnr .time .blue,
.content-ctnr .activity-item-ctnr:hover .username.f-left, .content-ctnr .activity-item-ctnr:hover .username.f-left,
.load-more-btn:hover, .load-more-btn:hover,
.user-panel .ctrl-btn.colored,
.user-panel .ctrl-btn:hover,
.load-error-panel .request-link, .load-error-panel .request-link,
.user-panel .logout-btn:active, .user-panel .logout-btn:active,
.user-panel .logout-btn:hover, .user-panel .logout-btn:hover,
@ -2210,8 +2183,7 @@ a.up-name:hover,
.video-toolbar .ops>span.on>i, .video-toolbar .ops>span.on>i,
.video-toolbar .ops>span:hover, .video-toolbar .ops>span:hover,
.video-toolbar .ops>span:hover>i, .video-toolbar .ops>span:hover>i,
.app-watch .app-look .foot-txt a, .app-watch .app-look .foot-txt a
#app .header .close:hover
{ {
color: var(--theme-color) !important; color: var(--theme-color) !important;
} }
@ -2296,8 +2268,6 @@ a.s-btn:hover,
.hour-rank .hour-rank-content, .hour-rank .hour-rank-content,
.attention-btn-ctnr .left-part, .attention-btn-ctnr .left-part,
.gift-item .corner-mark, .gift-item .corner-mark,
.gift-package,
.gift-package>span,
.rank.rank-1, .rank.rank-1,
.rank.rank-2, .rank.rank-2,
.rank.rank-3, .rank.rank-3,

View File

@ -883,7 +883,6 @@ th.list-head-text,
.main-content .group .bp-add-button .add-icon, .main-content .group .bp-add-button .add-icon,
.bp-input .option-delete, .bp-input .option-delete,
.edit-media-list .edit-mask .edit-board .edit-info .media-list-type .icon-check, .edit-media-list .edit-mask .edit-board .edit-info .media-list-type .icon-check,
#app .header .close:hover,
.edit-media-list .edit-mask .default-edit .default-edit-info .media-list-type .icon-check, .edit-media-list .edit-mask .default-edit .default-edit-info .media-list-type .icon-check,
.pin-layer-body .pin-layer-search #browser-version-tip #close-browser-tip, .pin-layer-body .pin-layer-search #browser-version-tip #close-browser-tip,
.pin-layer-body .pin-layer-search .icon, .pin-layer-body .pin-layer-search .icon,

View File

@ -194,11 +194,12 @@ $prefix: 'simplifyLiveroom-switch';
.seeds-wrap > .dp-i-block > .item:not(.seeds), .seeds-wrap > .dp-i-block > .item:not(.seeds),
.gift-control-panel .wish-icon, .gift-control-panel .wish-icon,
.gift-control-panel .wish-tip, .gift-control-panel .wish-tip,
.gift-control-panel .left-part-ctnr { .gift-control-panel .left-part-ctnr,
.web-live-player-gift-icon-wrap {
display: none !important; display: none !important;
} }
.gift-control-section, .gift-control-section,
.gift-control-panel { #gift-control-vm .gift-control-panel {
height: 48px !important; height: 48px !important;
} }
.gift-control-panel .right-part { .gift-control-panel .right-part {
@ -215,28 +216,40 @@ $prefix: 'simplifyLiveroom-switch';
} }
} }
.gift-control-panel { .gift-control-panel {
.gift-presets {
.gift-section {
display: flex !important;
}
}
.more-gift-section { .more-gift-section {
position: static !important; position: static !important;
margin: 0 10px 0 0 !important; margin: 0 6px 0 0 !important;
height: 48px !important; height: auto !important;
} }
.z-gift-package { .z-gift-package {
margin: auto 0 !important; margin: auto 0 !important;
position: static !important; position: static !important;
.gift-package { .gift-package-btn {
margin-top: 2px; padding: 0 !important;
} }
} }
.right-part { .right-part {
padding-top: 0 !important; padding-top: 0 !important;
} }
.right-section > .gift-section { .right-section {
height: 42px !important;
}
.battery-pic {
display: none !important; display: none !important;
} }
.skin-bg{ // .right-section {
// align-self: stretch !important;
// align-items: center !important;
// .vertical-separator {
// height: 100% !important;
// }
// > .gift-section {
// height: 42px !important;
// }
// }
.skin-bg {
height: 48px !important; height: 48px !important;
} }
} }

View File

@ -1,19 +1,17 @@
<template> <template>
<div class="bvid-convert"> <div class="bvid-convert">
<template v-if="aid && bvid"> <div v-if="aid" class="bvid-convert-item">
<div class="bvid-convert-item"> {{ aid }}
{{ aid }} <div class="bvid-convert-item-copy" title="复制链接" @click="copyLink('aid')">
<div class="bvid-convert-item-copy" title="复制链接" @click="copyLink('aid')"> <VIcon :size="16" :icon="aidCopied ? 'mdi-check' : 'mdi-link'" />
<VIcon :size="16" :icon="aidCopied ? 'mdi-check' : 'mdi-link'" />
</div>
</div> </div>
<div class="bvid-convert-item"> </div>
{{ bvid }} <div v-if="bvid" class="bvid-convert-item">
<div class="bvid-convert-item-copy" title="复制链接" @click="copyLink('bvid')"> {{ bvid }}
<VIcon :size="16" :icon="bvidCopied ? 'mdi-check' : 'mdi-link'" /> <div class="bvid-convert-item-copy" title="复制链接" @click="copyLink('bvid')">
</div> <VIcon :size="16" :icon="bvidCopied ? 'mdi-check' : 'mdi-link'" />
</div> </div>
</template> </div>
</div> </div>
</template> </template>
@ -112,7 +110,6 @@ export default Vue.extend({
flex-direction: column; flex-direction: column;
border-radius: 4px; border-radius: 4px;
padding: 6px 8px; padding: 6px 8px;
width: 100%;
user-select: text; user-select: text;
box-sizing: border-box; box-sizing: border-box;
box-shadow: 0 0 0 1px #8884; box-shadow: 0 0 0 1px #8884;

View File

@ -15,12 +15,18 @@ export const bangumiBatchInput: DownloadVideoInput = {
getInputs: async instance => instance?.checkedInputItems ?? [], getInputs: async instance => instance?.checkedInputItems ?? [],
component: async () => component: async () =>
createEpisodesPicker(async instance => { createEpisodesPicker(async instance => {
const metaUrl = document.querySelector("meta[property='og:url']") const metadata = dq('script[type="application/ld+json"]')
if (metaUrl === null) { if (!metadata) {
logError('获取番剧数据失败: 无法找到 Season ID') logError('获取番剧数据失败: 无法找到 Metadata')
return [] return []
} }
const seasonId = metaUrl.getAttribute('content')?.match(/play\/ss(\d+)/)?.[1] const metadataJson = JSON.parse(metadata.innerHTML.trim())
const metaUrl: string = lodash.get(metadataJson, 'itemListElement.0.url', null)
if (metaUrl === null) {
logError('获取番剧数据失败: 无法找到 metaUrl')
return []
}
const seasonId = metaUrl.match(/play\/ss(\d+)/)?.[1]
if (seasonId === undefined) { if (seasonId === undefined) {
logError('获取番剧数据失败: 无法解析 Season ID') logError('获取番剧数据失败: 无法解析 Season ID')
return [] return []

View File

@ -1,11 +1,13 @@
.video-desc .info, .video-desc .info,
.video-desc .desc-info, .video-desc .desc-info,
.video-desc-v1 .desc-info, .video-desc-v1 .desc-info,
.video-desc-container .basic-desc-info,
.play-up-info .play-up-self { .play-up-info .play-up-self {
height: auto !important; height: auto !important;
} }
.video-desc .btn, .video-desc .btn,
.video-desc .toggle-btn, .video-desc .toggle-btn,
.video-desc-container .toggle-btn,
.video-desc-v1 .toggle-btn, .video-desc-v1 .toggle-btn,
.play-up-info .play-up-self-btn { .play-up-info .play-up-self-btn {
display: none !important; display: none !important;

View File

@ -9,7 +9,7 @@ const name = 'fullVideoDescription'
const entry = () => { const entry = () => {
addStyle(style, name) addStyle(style, name)
videoChange(async () => { videoChange(async () => {
const desc = await select('.video-desc, .video-desc-v1') const desc = await select('.video-desc, .video-desc-v1, .video-desc-container')
if (!desc) { if (!desc) {
return return
} }

View File

@ -39,6 +39,9 @@ export const component = defineComponentMetadata({
select('.multi-page-v1 .head-left h3'), select('.multi-page-v1 .head-left h3'),
select('.base-video-sections-v1 .first-line-title'), select('.base-video-sections-v1 .first-line-title'),
]).then(titleElement => { ]).then(titleElement => {
if (!titleElement) {
return
}
titleElement.addEventListener( titleElement.addEventListener(
'click', 'click',
(e: MouseEvent) => { (e: MouseEvent) => {

View File

@ -1,5 +1,10 @@
<template> <template>
<span title="稍后再看" class="watchlater be-outer-watchlater" :class="{ on }" @click="toggle()"> <span
title="稍后再看"
class="watchlater be-outer-watchlater video-toolbar-left-item"
:class="{ on }"
@click="toggle()"
>
<VIcon class="icon" :size="28" icon="mdi-timetable"></VIcon> <VIcon class="icon" :size="28" icon="mdi-timetable"></VIcon>
<span class="text">稍后再看</span> <span class="text">稍后再看</span>
<div class="tip" :class="{ show: tipShowing }">{{ tipText }}</div> <div class="tip" :class="{ show: tipShowing }">{{ tipText }}</div>
@ -49,11 +54,11 @@ export default Vue.extend({
</script> </script>
<style lang="scss"> <style lang="scss">
.video-toolbar-left,
.video-toolbar .ops, .video-toolbar .ops,
.video-toolbar-v1 .toolbar-left { .video-toolbar-v1 .toolbar-left {
.watchlater { .watchlater {
font-size: 14px; font-size: 14px;
font-weight: normal;
margin-right: 28px !important; margin-right: 28px !important;
position: relative; position: relative;
width: auto !important; width: auto !important;
@ -89,6 +94,10 @@ export default Vue.extend({
} }
} }
} }
.video-toolbar-left .watchlater .be-icon {
transform: translateY(1px);
margin-right: 8px;
}
.video-toolbar-v1 .watchlater .be-icon { .video-toolbar-v1 .watchlater .be-icon {
transform: translateY(1px); transform: translateY(1px);
} }

View File

@ -4,9 +4,10 @@ import {
OptionsOfMetadata, OptionsOfMetadata,
} from '@/components/define' } from '@/components/define'
import { ComponentEntry } from '@/components/types' import { ComponentEntry } from '@/components/types'
import { matchUrlPattern } from '@/core/utils' import { getUID, matchUrlPattern, mountVueComponent } from '@/core/utils'
import { videoUrls, watchlaterUrls } from '@/core/utils/urls' import { videoUrls, watchlaterUrls } from '@/core/utils/urls'
import { KeyBindingAction } from '../../utils/keymap/bindings' import { KeyBindingAction } from '../../utils/keymap/bindings'
import { addVideoActionButton } from '@/components/video/video-actions'
const options = defineOptionsMetadata({ const options = defineOptionsMetadata({
showInWatchlaterPages: { showInWatchlaterPages: {
@ -21,29 +22,20 @@ const entry: ComponentEntry<Options> = async ({ settings }) => {
if (watchlaterUrls.some(matchUrlPattern) && !settings.options.showInWatchlaterPages) { if (watchlaterUrls.some(matchUrlPattern) && !settings.options.showInWatchlaterPages) {
return return
} }
const { mountVueComponent, getUID, playerReady } = await import('@/core/utils')
if (!getUID()) { if (!getUID()) {
return return
} }
await playerReady()
const favoriteButton = dq(
'.video-toolbar .ops .collect, .video-toolbar-v1 .toolbar-left .collect',
) as HTMLElement
if (!favoriteButton) {
return
}
const { hasVideo } = await import('@/core/spin-query')
await hasVideo()
const OuterWatchlater = await import('./OuterWatchlater.vue') const OuterWatchlater = await import('./OuterWatchlater.vue')
const vm: Vue & { const vm: Vue & {
aid: string aid: string
} = mountVueComponent(OuterWatchlater) } = mountVueComponent(OuterWatchlater)
favoriteButton.insertAdjacentElement('afterend', vm.$el) if (await addVideoActionButton(() => vm.$el)) {
const { videoChange } = await import('@/core/observer') const { videoChange } = await import('@/core/observer')
videoChange(({ aid }) => { videoChange(({ aid }) => {
console.log('videoChange', unsafeWindow.aid, aid) console.log('videoChange', unsafeWindow.aid, aid)
vm.aid = unsafeWindow.aid vm.aid = unsafeWindow.aid
}) })
}
} }
export const component = defineComponentMetadata({ export const component = defineComponentMetadata({
name: 'outerWatchlater', name: 'outerWatchlater',

View File

@ -35,6 +35,7 @@
@include on-fullscreen { @include on-fullscreen {
height: calc(100% - 11px); height: calc(100% - 11px);
} }
.playlist-container &,
.video-container-v1 & { .video-container-v1 & {
height: calc(100% - 5px); height: calc(100% - 5px);
@include on-fullscreen { @include on-fullscreen {

View File

@ -1,6 +1,6 @@
<template> <template>
<span <span
class="quick-favorite be-quick-favorite" class="quick-favorite be-quick-favorite video-toolbar-left-item"
title="快速收藏" title="快速收藏"
:class="{ on: isFavorite }" :class="{ on: isFavorite }"
@click.left.self="toggle()" @click.left.self="toggle()"
@ -104,7 +104,7 @@ export default Vue.extend({
}, },
methods: { methods: {
async syncFavoriteState() { async syncFavoriteState() {
if (options.favoriteFolderID === 0) { if (options.favoriteFolderID === 0 || !this.aid) {
return return
} }
try { try {
@ -188,7 +188,6 @@ export default Vue.extend({
margin-right: 28px !important; margin-right: 28px !important;
position: relative; position: relative;
font-size: 14px; font-size: 14px;
font-weight: normal;
width: auto !important; width: auto !important;
.text { .text {
display: inline; display: inline;
@ -218,6 +217,9 @@ export default Vue.extend({
.video-toolbar-v1 & { .video-toolbar-v1 & {
transform: translateY(1px); transform: translateY(1px);
} }
.video-toolbar-left & {
margin-right: 8px;
}
} }
.tip, .tip,
.select-list { .select-list {

View File

@ -4,9 +4,11 @@ import {
OptionsOfMetadata, OptionsOfMetadata,
} from '@/components/define' } from '@/components/define'
import { ComponentEntry } from '@/components/types' import { ComponentEntry } from '@/components/types'
import { matchUrlPattern } from '@/core/utils' import { getUID, matchUrlPattern, mountVueComponent } from '@/core/utils'
import { favoriteListUrls, videoUrls } from '@/core/utils/urls' import { favoriteListUrls, videoUrls } from '@/core/utils/urls'
import { KeyBindingAction } from '../../utils/keymap/bindings' import { KeyBindingAction } from '../../utils/keymap/bindings'
import { addVideoActionButton } from '@/components/video/video-actions'
import { videoChange } from '@/core/observer'
const options = defineOptionsMetadata({ const options = defineOptionsMetadata({
favoriteFolderID: { favoriteFolderID: {
@ -26,29 +28,16 @@ const entry: ComponentEntry<Options> = async ({ settings }) => {
if (favoriteListUrls.some(matchUrlPattern) && !settings.options.showInFavoritePages) { if (favoriteListUrls.some(matchUrlPattern) && !settings.options.showInFavoritePages) {
return return
} }
const { playerReady, mountVueComponent, getUID } = await import('@/core/utils')
if (!getUID()) { if (!getUID()) {
return return
} }
await playerReady()
const favoriteButton = dq(
'.video-toolbar .ops .collect, .video-toolbar-v1 .toolbar-left .collect',
)
if (!favoriteButton) {
return
}
const QuickFavorite = await import('./QuickFavorite.vue') const QuickFavorite = await import('./QuickFavorite.vue')
let vm: Vue & { const vm: Vue & {
aid: string aid: string
syncFavoriteState: () => Promise<void> syncFavoriteState: () => Promise<void>
} } = mountVueComponent(QuickFavorite)
const { videoChange } = await import('@/core/observer') await addVideoActionButton(() => vm.$el)
videoChange(() => { videoChange(() => {
if (!vm) {
vm = mountVueComponent(QuickFavorite)
favoriteButton.insertAdjacentElement('afterend', vm.$el)
}
vm.aid = unsafeWindow.aid vm.aid = unsafeWindow.aid
vm.syncFavoriteState() vm.syncFavoriteState()
}) })

View File

@ -15,6 +15,7 @@ import * as assUtils from './video/ass-utils'
import * as xmlUtils from './video/xml-utils' import * as xmlUtils from './video/xml-utils'
import * as playerAgent from './video/player-agent' import * as playerAgent from './video/player-agent'
import * as playerLight from './video/player-light' import * as playerLight from './video/player-light'
import * as videoActions from './video/video-actions'
import * as videoDanmaku from './video/video-danmaku' import * as videoDanmaku from './video/video-danmaku'
import * as videoInfo from './video/video-info' import * as videoInfo from './video/video-info'
import * as videoQuality from './video/video-quality' import * as videoQuality from './video/video-quality'
@ -54,6 +55,7 @@ export const componentApis = {
assUtils, assUtils,
playerLight, playerLight,
playerAgent, playerAgent,
videoActions,
videoDanmaku, videoDanmaku,
videoInfo, videoInfo,
videoQuality, videoQuality,

View File

@ -1,8 +1,9 @@
import { attributes } from '@/core/observer' import { attributes } from '@/core/observer'
import { select } from '@/core/spin-query' import { select } from '@/core/spin-query'
import { preventEvent } from '@/core/utils' import { playerReady, preventEvent } from '@/core/utils'
const playerModePolyfill = async () => { const playerModePolyfill = async () => {
await playerReady()
const bpxContainer = (await select('.bpx-player-container')) as HTMLElement const bpxContainer = (await select('.bpx-player-container')) as HTMLElement
if (!bpxContainer) { if (!bpxContainer) {
console.warn('[bpx player polyfill] bpxContainer not found') console.warn('[bpx player polyfill] bpxContainer not found')
@ -29,8 +30,8 @@ const idPolyfill = async () => {
cid: pbp.options.cid.toString(), cid: pbp.options.cid.toString(),
bvid: pbp.options.bvid, bvid: pbp.options.bvid,
} }
if (Object.values(idData).some(it => it === '' || parseInt(it) <= 0)) { if (Object.values(idData).some(it => !it || parseInt(it) <= 0)) {
console.warn('[bpx player polyfill] invalid pbp data') console.warn('[bpx player polyfill] invalid pbp data', pbp.options)
} }
Object.assign(unsafeWindow, idData) Object.assign(unsafeWindow, idData)
} }

View File

@ -0,0 +1,26 @@
import { Executable } from '@/core/common-types'
import { playerReady } from '@/core/utils'
/**
* "收藏"
* @param getButton ,
* @returns , null
*/
export const addVideoActionButton = async (getButton: Executable<Element>) => {
await playerReady()
const favoriteButton = dq(
'.video-toolbar .ops .collect, .video-toolbar-v1 .toolbar-left .collect, .video-toolbar-left-item.video-fav',
) as HTMLElement
if (!favoriteButton) {
return null
}
const { hasVideo } = await import('@/core/spin-query')
await hasVideo()
const button = await getButton()
if (favoriteButton.classList.contains('video-fav')) {
favoriteButton.parentElement.insertAdjacentElement('afterend', button)
} else {
favoriteButton.insertAdjacentElement('afterend', button)
}
return button
}

View File

@ -2,7 +2,10 @@ import { matchUrlPattern } from '.'
import { TestPattern } from '../common-types' import { TestPattern } from '../common-types'
/** 稍后再看页面 */ /** 稍后再看页面 */
export const watchlaterUrls = ['//www.bilibili.com/medialist/play/watchlater'] export const watchlaterUrls = [
'//www.bilibili.com/medialist/play/watchlater',
'//www.bilibili.com/list/watchlater',
]
/** 收藏夹连播页面 */ /** 收藏夹连播页面 */
export const favoriteListUrls = ['//www.bilibili.com/medialist/play/ml'] export const favoriteListUrls = ['//www.bilibili.com/medialist/play/ml']
/** UP 主视频连播页面 */ /** UP 主视频连播页面 */

View File

@ -1,8 +1,12 @@
/* ⚠ Ajax Hook API 已废弃, 请勿使用 */
import { PluginMetadata } from '../plugin' import { PluginMetadata } from '../plugin'
// https://github.com/the1812/Bilibili-Evolved/issues/84 // https://github.com/the1812/Bilibili-Evolved/issues/84
let ajaxHooked = false let ajaxHooked = false
const handlerMap: Map<string, ((...args: any[]) => void)[]> = new Map() const handlerMap: Map<string, ((...args: any[]) => void)[]> = new Map()
/** @deprecated ⚠ Ajax Hook API 已废弃, 请勿使用 */
export const getHandlers = (name: string) => { export const getHandlers = (name: string) => {
const lowercase = name.toLowerCase() const lowercase = name.toLowerCase()
let handlers = handlerMap.get(lowercase) let handlers = handlerMap.get(lowercase)

View File

@ -1,3 +1,5 @@
/* ⚠ Ajax Hook API 已废弃, 请勿使用 */
import { getHandlers } from '.' import { getHandlers } from '.'
type AjaxListenerType = type AjaxListenerType =
@ -12,6 +14,7 @@ type AjaxListenerType =
/** /**
* Ajax监听器 * Ajax监听器
* @deprecated Ajax Hook API , 使
* @param type * @param type
* @param listener * @param listener
*/ */
@ -20,6 +23,7 @@ export const addAjaxListener = (type: AjaxListenerType, listener: (...args: any[
} }
/** /**
* Ajax监听器 * Ajax监听器
* @deprecated Ajax Hook API , 使
* @param type * @param type
* @param listener * @param listener
*/ */