mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
Merge branch 'main' into refactor-message-listeners
This commit is contained in:
2
.github/workflows/changelog.yml
vendored
2
.github/workflows/changelog.yml
vendored
@@ -19,6 +19,6 @@ jobs:
|
||||
token: ${{ secrets.RELEASE_TOKEN }}
|
||||
release-type: node
|
||||
package-name: release-please-action
|
||||
release-as: 0.15.4
|
||||
release-as: 0.15.5
|
||||
signoff: 'github-actions <41898282+github-actions[bot]@users.noreply.github.com>'
|
||||
changelog-types: '[{"type":"types","section":"Types","hidden":false},{"type":"revert","section":"Reverts","hidden":false},{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"improvement","section":"Feature Improvements","hidden":false},{"type":"docs","section":"Docs","hidden":false},{"type":"i18n","section":"I18n","hidden":true},{"type":"style","section":"Style Changes","hidden":false},{"type":"ci","section":"CI","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":true},{"type":"contributor","section":"New Contributors","hidden":false},{"type":"notice","section":"Notices","hidden":false}]'
|
||||
|
||||
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,5 +1,19 @@
|
||||
# Changelog
|
||||
|
||||
## [0.15.5](https://github.com/hakadao/BewlyBewly/compare/v0.15.4...v0.15.5) (2024-03-30)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* support dark mode for watch later, 404 page && adjust the regex rules ([96a8504](https://github.com/hakadao/BewlyBewly/commit/96a85047daab0a66d88af4cfe28e6fb115316320))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* `#` suffix bilibili home uri ([f5cfd2f](https://github.com/hakadao/BewlyBewly/commit/f5cfd2f46e159f3a4536f242393cd58f64bd75d4))
|
||||
* adapt previously unadapted comments section ([43878d6](https://github.com/hakadao/BewlyBewly/commit/43878d691b0a10ea1c8179bb1259b8fa25412b3b))
|
||||
* extension not working when accessing www.bilibili.com/#/ ([d66e961](https://github.com/hakadao/BewlyBewly/commit/d66e9610ac176a04a762bf56421b22acbceebb50))
|
||||
|
||||
## [0.15.3](https://github.com/hakadao/BewlyBewly/compare/v0.15.2...v0.15.3) (2024-03-17)
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "bewly-bewly",
|
||||
"displayName": "BewlyBewly",
|
||||
"version": "0.15.4",
|
||||
"version": "0.15.5",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@8.15.3",
|
||||
"description": "Just make a few small changes to your Bilibili homepage.",
|
||||
|
||||
@@ -30,36 +30,40 @@ function isSupportedPages() {
|
||||
// homepage
|
||||
isHomePage()
|
||||
// fix #166 https://github.com/hakadao/BewlyBewly/issues/166
|
||||
|| /https?:\/\/www.bilibili.com\/\?bvid=.*$/.test(currentUrl)
|
||||
|| /https?:\/\/www\.bilibili\.com\/\?bvid=.*$/.test(currentUrl)
|
||||
|
||||
// video page
|
||||
|| /https?:\/\/(www.)?bilibili.com\/(video|list)\/.*/.test(currentUrl)
|
||||
|| /https?:\/\/(www.)?bilibili\.com\/(video|list)\/.*/.test(currentUrl)
|
||||
// anime playback & movie page
|
||||
|| /https?:\/\/(www.)?bilibili.com\/bangumi\/play\/.*/.test(currentUrl)
|
||||
|| /https?:\/\/(www\.)?bilibili\.com\/bangumi\/play\/.*/.test(currentUrl)
|
||||
// watch later playlist
|
||||
|| /https?:\/\/(www.)?bilibili.com\/list\/watchlater.*/.test(currentUrl)
|
||||
|| /https?:\/\/(www\.)?bilibili\.com\/list\/watchlater.*/.test(currentUrl)
|
||||
// favorite playlist
|
||||
|| /https?:\/\/(www.)?bilibili.com\/list\/ml.*/.test(currentUrl)
|
||||
|| /https?:\/\/(www\.)?bilibili\.com\/list\/ml.*/.test(currentUrl)
|
||||
// search page
|
||||
|| /https?:\/\/search.bilibili.com\.*/.test(currentUrl)
|
||||
|| /https?:\/\/search\.bilibili\.com\.*/.test(currentUrl)
|
||||
// moments
|
||||
|| /https?:\/\/t.bilibili.com\.*/.test(currentUrl)
|
||||
|| /https?:\/\/t\.bilibili\.com\.*/.test(currentUrl)
|
||||
// moment detail
|
||||
|| /https?:\/\/www.bilibili.com\/opus\/.*/.test(currentUrl)
|
||||
|| /https?:\/\/(www\.)?bilibili\.com\/opus\/.*/.test(currentUrl)
|
||||
// history page
|
||||
|| /https?:\/\/(www.)?bilibili.com\/account\/history.*/.test(currentUrl)
|
||||
|| /https?:\/\/(www\.)?bilibili\.com\/account\/history.*/.test(currentUrl)
|
||||
// watcher later page
|
||||
|| /https?:\/\/(www\.)?bilibili\.com\/watchlater\/#\/list.*/.test(currentUrl)
|
||||
// user space page
|
||||
|| /https?:\/\/space.bilibili.com\.*/.test(currentUrl)
|
||||
|| /https?:\/\/space\.bilibili\.com\.*/.test(currentUrl)
|
||||
// notifications page
|
||||
|| /https?:\/\/message.bilibili.com\.*/.test(currentUrl)
|
||||
|| /https?:\/\/message\.bilibili\.com\.*/.test(currentUrl)
|
||||
// bilibili channel page b站分区页面
|
||||
|| /https?:\/\/www.bilibili.com\/v\/(?!popular).*/.test(currentUrl)
|
||||
|| /https?:\/\/(www\.)?bilibili\.com\/v\/(?!popular).*/.test(currentUrl)
|
||||
// anime page & chinese anime page
|
||||
|| /https?:\/\/www.bilibili.com\/(anime|guochuang).*/.test(currentUrl)
|
||||
|| /https?:\/\/(www\.)?bilibili\.com\/(anime|guochuang).*/.test(currentUrl)
|
||||
// channel page e.g. tv shows, movie, variety shows, mooc page
|
||||
|| /https?:\/\/(www.)?bilibili.com\/(tv|movie|variety|mooc|documentary).*/.test(currentUrl)
|
||||
|| /https?:\/\/(www\.)?bilibili\.com\/(tv|movie|variety|mooc|documentary).*/.test(currentUrl)
|
||||
// article page
|
||||
|| /https?:\/\/(www.)?bilibili.com\/(read).*/.test(currentUrl)
|
||||
|| /https?:\/\/(www\.)?bilibili\.com\/(read).*/.test(currentUrl)
|
||||
// 404 page
|
||||
|| /^https?:\/\/(www\.)?bilibili\.com\/404.*$/.test(currentUrl)
|
||||
)
|
||||
return true
|
||||
else
|
||||
|
||||
@@ -83,6 +83,11 @@
|
||||
border-color: var(--bew-border-color);
|
||||
}
|
||||
|
||||
.reply-box .box-normal .reply-box-warp.focus-within,
|
||||
.reply-box .box-normal .reply-box-warp:hover {
|
||||
border-color: var(--bew-theme-color);
|
||||
}
|
||||
|
||||
.reply-box .box-expand .svg-icon svg path {
|
||||
filter: invert(1) hue-rotate(180deg);
|
||||
}
|
||||
|
||||
35
src/styles/adaptedStyles/error404Page.scss
Normal file
35
src/styles/adaptedStyles/error404Page.scss
Normal file
@@ -0,0 +1,35 @@
|
||||
.bewly-design.error404Page {
|
||||
.error-manga img {
|
||||
background-color: white;
|
||||
border-top: 20px solid white;
|
||||
border-bottom: 20px solid white;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: var(--bew-homepage-bg);
|
||||
}
|
||||
|
||||
// #region theme color adaption part
|
||||
// Increase the priority of the style inside by writing a non-existent selector in :not()
|
||||
:not(fdjslfds) {
|
||||
.error-panel .rollback-btn,
|
||||
.error-manga .change-img-btn {
|
||||
background-color: var(--bew-theme-color);
|
||||
}
|
||||
|
||||
.error-panel .rollback-btn:hover,
|
||||
.error-manga .change-img-btn:hover {
|
||||
background-color: var(--bew-theme-color-80);
|
||||
}
|
||||
}
|
||||
// #endregion
|
||||
|
||||
// #region dark mode adaption part
|
||||
&.dark {
|
||||
.error-container {
|
||||
background-color: var(--bew-content-solid-1);
|
||||
}
|
||||
}
|
||||
// #endregion
|
||||
}
|
||||
@@ -1,17 +1,43 @@
|
||||
.bewly-design {
|
||||
.bili-footer {
|
||||
color: var(--bew-text-2);
|
||||
|
||||
.footer-wrp {
|
||||
background-color: var(--bew-content-solid-1);
|
||||
// #region theme color adaption part
|
||||
// Increase the priority of the style inside by writing a non-existent selector in :not()
|
||||
:not(fdjslfds) {
|
||||
.bili-footer a:hover,
|
||||
.international-footer a:hover,
|
||||
.international-footer .partner a:hover,
|
||||
.international-footer .link-box .link-item.link-c a:hover p {
|
||||
color: var(--bew-theme-color);
|
||||
}
|
||||
}
|
||||
// #endregion
|
||||
|
||||
a {
|
||||
// #region dark mode adaption part
|
||||
&.dark {
|
||||
.bili-footer a,
|
||||
.international-footer a,
|
||||
.international-footer .link-box .link-item.link-c p {
|
||||
color: var(--bew-text-1);
|
||||
}
|
||||
|
||||
.boston-postcards li {
|
||||
.bili-footer,
|
||||
.international-footer .link-box .link-item .bt {
|
||||
color: var(--bew-text-2);
|
||||
}
|
||||
|
||||
.international-footer .partner,
|
||||
.international-footer .partner a {
|
||||
color: var(--bew-text-3);
|
||||
}
|
||||
|
||||
.bili-footer .footer-wrp,
|
||||
.international-footer {
|
||||
background-color: var(--bew-content-solid-1);
|
||||
}
|
||||
|
||||
.bili-footer .boston-postcards li,
|
||||
.international-footer .link-box .link-item {
|
||||
border-color: var(--bew-border-color);
|
||||
}
|
||||
}
|
||||
// #endregion
|
||||
}
|
||||
|
||||
@@ -5,22 +5,19 @@ import './modal.scss'
|
||||
import './btn.scss'
|
||||
import './userCard.scss'
|
||||
import './videoPlayer.scss'
|
||||
import { isHomePage } from '~/utils/main'
|
||||
|
||||
async function setupStyles() {
|
||||
const currentUrl = document.URL
|
||||
|
||||
// homepage 首页
|
||||
if (/https?:\/\/bilibili.com\/?$/.test(currentUrl)
|
||||
|| /https?:\/\/www.bilibili.com\/?$/.test(currentUrl)
|
||||
|| /https?:\/\/www.bilibili.com\/index.html$/.test(currentUrl)
|
||||
|| /https?:\/\/bilibili.com\/\?spm_id_from=.*/.test(currentUrl)
|
||||
|| /https?:\/\/www.bilibili.com\/\?spm_id_from=(.)*/.test(currentUrl)) {
|
||||
if (isHomePage()) {
|
||||
await import('./homePage.scss')
|
||||
document.documentElement.classList.add('homePage')
|
||||
}
|
||||
|
||||
// notifications page 消息页
|
||||
else if (/https?:\/\/message.bilibili.com\.*/.test(currentUrl)) {
|
||||
else if (/https?:\/\/message\.bilibili\.com\.*/.test(currentUrl)) {
|
||||
await import('./notificationsPage.scss')
|
||||
document.documentElement.classList.add('notificationsPage')
|
||||
}
|
||||
@@ -28,38 +25,44 @@ async function setupStyles() {
|
||||
// moments page 动态页
|
||||
else if (
|
||||
// moments
|
||||
/https?:\/\/t.bilibili.com\.*/.test(currentUrl)
|
||||
/https?:\/\/t\.bilibili\.com\.*/.test(currentUrl)
|
||||
// moment detail
|
||||
|| /https?:\/\/www.bilibili.com\/opus\/.*/.test(currentUrl)) {
|
||||
|| /https?:\/\/www\.bilibili\.com\/opus\/.*/.test(currentUrl)) {
|
||||
await import('./momentsPage.scss')
|
||||
document.documentElement.classList.add('momentsPage')
|
||||
}
|
||||
|
||||
// history page 历史记录页
|
||||
else if (/https?:\/\/(www.)?bilibili.com\/account\/history.*/.test(currentUrl)) {
|
||||
else if (/https?:\/\/(www\.)?bilibili\.com\/account\/history.*/.test(currentUrl)) {
|
||||
await import('./historyPage.scss')
|
||||
document.documentElement.classList.add('historyPage')
|
||||
}
|
||||
|
||||
// watch later page 稍候再看页
|
||||
else if (/https?:\/\/(www\.)?bilibili\.com\/watchlater\/#\/list.*/.test(currentUrl)) {
|
||||
await import('./watchLaterPage.scss')
|
||||
document.documentElement.classList.add('watchLaterPage')
|
||||
}
|
||||
|
||||
// user space page 空间页
|
||||
else if (/https?:\/\/space.bilibili.com\.*/.test(currentUrl)) {
|
||||
else if (/https?:\/\/space.bilibili\.com\.*/.test(currentUrl)) {
|
||||
await import('./userSpacePage.scss')
|
||||
document.documentElement.classList.add('userSpacePage')
|
||||
}
|
||||
|
||||
// search page 搜索结果页
|
||||
else if (/https?:\/\/search.bilibili.com\.*/.test(currentUrl)) {
|
||||
else if (/https?:\/\/search.bilibili\.com\.*/.test(currentUrl)) {
|
||||
await import('./searchPage.scss')
|
||||
document.documentElement.classList.add('searchPage')
|
||||
}
|
||||
|
||||
// video page 视频页
|
||||
else if (
|
||||
/https?:\/\/(www.)?bilibili.com\/video\/.*/.test(currentUrl)
|
||||
/https?:\/\/(www\.)?bilibili\.com\/video\/.*/.test(currentUrl)
|
||||
// watch later playlist 稍候再看播放页
|
||||
|| /https?:\/\/(www.)?bilibili.com\/list\/watchlater.*/.test(currentUrl)
|
||||
|| /https?:\/\/(www\.)?bilibili\.com\/list\/watchlater.*/.test(currentUrl)
|
||||
// favorite playlist 收藏播放页
|
||||
|| /https?:\/\/(www.)?bilibili.com\/list\/ml.*/.test(currentUrl)
|
||||
|| /https?:\/\/(www\.)?bilibili\.com\/list\/ml.*/.test(currentUrl)
|
||||
) {
|
||||
await import('./videoPage.scss')
|
||||
document.documentElement.classList.add('videoPage')
|
||||
@@ -67,7 +70,7 @@ async function setupStyles() {
|
||||
|
||||
else if (
|
||||
// anime playback & movie page 番剧播放页与电影播放页
|
||||
/https?:\/\/(www.)?bilibili.com\/bangumi\/play\/.*/.test(currentUrl)
|
||||
/https?:\/\/(www\.)?bilibili\.com\/bangumi\/play\/.*/.test(currentUrl)
|
||||
) {
|
||||
await import('./animePlayback&MoviePage.scss')
|
||||
document.documentElement.classList.add('animePlaybackAndMoviePage')
|
||||
@@ -75,23 +78,29 @@ async function setupStyles() {
|
||||
|
||||
// anime page & chinese anime page 番剧页 与 国创动漫
|
||||
else if (
|
||||
/https?:\/\/(www.)?bilibili.com\/(anime|guochuang).*/.test(currentUrl)) {
|
||||
/https?:\/\/(www\.)?bilibili\.com\/(anime|guochuang).*/.test(currentUrl)) {
|
||||
await import('./animePage.scss')
|
||||
document.documentElement.classList.add('animePage')
|
||||
}
|
||||
|
||||
// channel page e.g. tv shows, movie, variety shows, mooc page 分区页
|
||||
else if (
|
||||
/https?:\/\/(www.)?bilibili.com\/(tv|movie|variety|mooc|documentary).*/.test(currentUrl)) {
|
||||
/https?:\/\/(www\.)?bilibili\.com\/(tv|movie|variety|mooc|documentary).*/.test(currentUrl)) {
|
||||
await import('./channelPage.scss')
|
||||
document.documentElement.classList.add('channelPage')
|
||||
}
|
||||
|
||||
// articles page 专栏页
|
||||
else if (/https?:\/\/(www.)?bilibili.com\/read.*/.test(currentUrl)) {
|
||||
else if (/https?:\/\/(www\.)?bilibili\.com\/read.*/.test(currentUrl)) {
|
||||
await import('./articlesPage.scss')
|
||||
document.documentElement.classList.add('articlesPage')
|
||||
}
|
||||
|
||||
// 404 page 404页
|
||||
else if (/^https?:\/\/(www\.)?bilibili\.com\/404.*$/.test(currentUrl)) {
|
||||
await import('./error404Page.scss')
|
||||
document.documentElement.classList.add('error404Page')
|
||||
}
|
||||
}
|
||||
|
||||
setupStyles()
|
||||
|
||||
45
src/styles/adaptedStyles/watchLaterPage.scss
Normal file
45
src/styles/adaptedStyles/watchLaterPage.scss
Normal file
@@ -0,0 +1,45 @@
|
||||
.bewly-design.watchLaterPage {
|
||||
// #region theme color adaption part
|
||||
// Increase the priority of the style inside by writing a non-existent selector in :not()
|
||||
:not(fdjslfds) {
|
||||
.watch-later-list header .s-btn {
|
||||
border-color: var(--bew-theme-color);
|
||||
}
|
||||
|
||||
.watch-later-list header .s-btn,
|
||||
.watch-later-list .list-box .av-item .av-about .t:hover,
|
||||
.watch-later-list .list-box .av-item .av-about .info .user:hover {
|
||||
color: var(--bew-theme-color);
|
||||
}
|
||||
|
||||
.watch-later-list header .s-btn:hover {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.watch-later-list header .s-btn:hover {
|
||||
background-color: var(--bew-theme-color);
|
||||
}
|
||||
}
|
||||
// #endregion
|
||||
|
||||
// #region dark mode adaption part
|
||||
&.dark {
|
||||
.watch-later-list .list-box .av-item .key,
|
||||
.watch-later-list .list-box .av-item .av-about .t {
|
||||
color: var(--bew-text-1);
|
||||
}
|
||||
|
||||
.watch-later-list .list-box .av-item .av-about .info .user {
|
||||
color: var(--bew-text-2);
|
||||
}
|
||||
|
||||
.watch-later-list .list-box .av-item .av-about {
|
||||
border-color: var(--bew-border-color);
|
||||
}
|
||||
|
||||
.watch-later-list header .s-btn {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
// #endregion
|
||||
}
|
||||
@@ -115,7 +115,7 @@ export function delay(ms: number) {
|
||||
*/
|
||||
export function isHomePage(): boolean {
|
||||
if (
|
||||
/https?:\/\/(www\.)bilibili.com\/?#?$/.test(location.href)
|
||||
/https?:\/\/(www\.)bilibili.com\/?(#\/?)?$/.test(location.href)
|
||||
|| /https?:\/\/(www\.)bilibili.com\/index\.html$/.test(location.href)
|
||||
|| /https?:\/\/(www\.)?bilibili.com\/\?spm_id_from=(.)*/.test(location.href)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user