Merge pull request #182 from hakadao/main

This commit is contained in:
Hakadao
2024-01-17 02:13:17 +08:00
committed by GitHub
9 changed files with 107 additions and 40 deletions

View File

@@ -19,6 +19,6 @@ jobs:
token: ${{ secrets.RELEASE_TOKEN }}
release-type: node
package-name: release-please-action
release-as: 0.14.0
release-as: 0.14.1
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":false},{"type":"ci","section":"CI","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false},{"type":"contributor","section":"New Contributors","hidden":false},{"type":"notice","section":"Notices","hidden":false}]'

View File

@@ -1,5 +1,24 @@
# Changelog
## [0.14.1](https://github.com/hakadao/BewlyBewly/compare/v0.14.0...v0.14.1) (2024-01-16)
### Reverts
* revert search bar code to previous version to undo recent changes ([272ed02](https://github.com/hakadao/BewlyBewly/commit/272ed0233abc1f0f5fb3f9be812f95fd9c371a06))
### Bug Fixes
* 专栏页面侧边栏目录按钮垂直居中 ([e2f4427](https://github.com/hakadao/BewlyBewly/commit/e2f44275e3d77faedf5b00df8b8443fb06f48c9e))
* 从稍后再看打开视频时自动跳转 [#180](https://github.com/hakadao/BewlyBewly/issues/180) ([1edf382](https://github.com/hakadao/BewlyBewly/commit/1edf3822770c172a371ea7183e9d8582ffc9ffc2))
### Miscellaneous
* adjust regex ([781b2c0](https://github.com/hakadao/BewlyBewly/commit/781b2c07d781dddb02662b875e46c58eb8984f20))
* update version number ([d459603](https://github.com/hakadao/BewlyBewly/commit/d459603a5b27874883263a19b0b654fc872dd206))
## [0.14.0](https://github.com/hakadao/BewlyBewly/compare/v0.13.3...v0.14.0) (2024-01-14)

View File

@@ -1,7 +1,7 @@
{
"name": "bewly-bewly",
"displayName": "BewlyBewly",
"version": "0.14.0",
"version": "0.14.1",
"private": true,
"packageManager": "pnpm@8.14.1",
"description": "Just make a few small changes to your Bilibili homepage.",

View File

@@ -143,7 +143,9 @@ function injectApp() {
container.id = 'bewly'
const root = document.createElement('div')
const styleEl = document.createElement('link')
const shadowDOM = container.attachShadow?.({ mode: __DEV__ ? 'open' : 'closed' }) || container
// Fix #69 https://github.com/hakadao/BewlyBewly/issues/69
// https://medium.com/@emilio_martinez/shadow-dom-open-vs-closed-1a8cf286088a - open shadow dom
const shadowDOM = container.attachShadow?.({ mode: 'open' }) || container
styleEl.setAttribute('rel', 'stylesheet')
styleEl.setAttribute('href', browser.runtime.getURL('dist/contentScripts/style.css'))
shadowDOM.appendChild(styleEl)

View File

@@ -91,7 +91,7 @@ watch(() => settings.value.adaptToOtherPageStyles, () => {
})
onMounted(() => {
openVideoPageIfBvidExists()
// openVideoPageIfBvidExists()
if (isHomePage()) {
// Force overwrite Bilibili Evolved body tag & html tag background color
@@ -239,19 +239,19 @@ function handleOsScroll() {
topBarRef.value?.handleScroll()
}
// fix #166 https://github.com/hakadao/BewlyBewly/issues/166
function openVideoPageIfBvidExists() {
// Assume the URL is https://www.bilibili.com/?bvid=BV1be41127ft&spm_id_from=333.788.seo.out
// // fix #166 https://github.com/hakadao/BewlyBewly/issues/166
// function openVideoPageIfBvidExists() {
// // Assume the URL is https://www.bilibili.com/?bvid=BV1be41127ft&spm_id_from=333.788.seo.out
// Get the current URL's query string
const queryString = window.location.search
// Create a URLSearchParams instance
const urlParams = new URLSearchParams(queryString)
const bvid = urlParams.get('bvid')
// // Get the current URL's query string
// const queryString = window.location.search
// // Create a URLSearchParams instance
// const urlParams = new URLSearchParams(queryString)
// const bvid = urlParams.get('bvid')
if (bvid)
window.open(`https://www.bilibili.com/video/${bvid}`, '_self')
}
// if (bvid)
// window.open(`https://www.bilibili.com/video/${bvid}`, '_self')
// }
provide('handleBackToTop', handleBackToTop)
provide('handleRefresh', handleRefresh)

View File

@@ -3,6 +3,10 @@
line-height: unset;
}
.right-side-bar .catalog{
justify-content: center;
}
body {
background-color: unset;
}

View File

@@ -1,41 +1,66 @@
.bewly-design {
.channel-swiper .channel-carousel-tool .channel-nav-click li.active {
background-color: var(--bew-theme-color);
}
.inner-c .play-icon.button,
.hover-c .play-icon.button {
background-color: var(--bew-theme-color-80);
}
.banner-wrapper {
background-color: black;
margin-bottom: 0 !important;
padding-bottom: 20px !important;
}
.promotion-c {
.index-module {
padding-bottom: 20px;
background: linear-gradient(0deg,#111319 40px,rgba(17,19,25,.8) 60.12%,rgba(20,20,20,.0001))
}
.promotion-c,
.link-c .link,
.section-title .subTitle {
background-color: var(--bew-fill-1);
}
.hover-c .title,
:not(.index-module) > .inner-c .title {
:not(.index-module) > .inner-c .title,
.link-c .link,
.section-title .subTitle {
color: var(--bew-text-1);
}
.banner-wrapper .side-list .side-item .title {
.banner-wrapper .side-list .side-item .title,
.section-title .subTitle.highlight {
color: white;
}
.index-module .all-a:hover .all,
.index-module .all-a:hover .arrow-all,
.index-module .sub-m:hover,
.hot-module .hot-item:hover .title,
.promotion-c:hover .title,
.hover-c:hover .title {
color: var(--bew-theme-color);
.link-c .link {
border-color: var(--bew-border-color);
}
// #region theme color adaption part
// Increase the priority of the style inside by writing a non-existent selector in :not()
:not(fjdslfds) {
.channel-swiper .channel-carousel-tool .channel-nav-click li.active,
.hot-module .left .goto,
.switch-c.checked,
.section-title .subTitle.highlight {
background-color: var(--bew-theme-color);
}
.inner-c .play-icon.button,
.hover-c .play-icon.button,
.hot-module .left .goto:hover {
background-color: var(--bew-theme-color-80);
}
.index-module .all-a:hover .all,
.index-module .all-a:hover .arrow-all,
.index-module .sub-m:hover,
.hot-module .hot-item:hover .title,
.promotion-c:hover .title,
.hover-c:hover .title,
.switch-c .round {
color: var(--bew-theme-color);
}
}
// #endregion
// #region dark mode adaption part
&.dark {
.channel-swiper .channel-carousel-tool .channel-nav-click li {
background-color: var(--bew-fill-1);
@@ -44,5 +69,10 @@
.channel-container .el-input__inner {
box-shadow: 0 0 0 1px var(--bew-border-color) inset;
}
.season-cover {
background-color: transparent;
}
}
// #endregion
}

View File

@@ -53,14 +53,25 @@
&.dark {
// Comment input box
.reply-box .box-normal .reply-box-warp .reply-box-textarea {
background-color: var(--bew-fill-1);
border-color: var(--bew-border-color);
}
// .reply-box .box-normal .reply-box-warp .reply-box-textarea {
// background-color: var(--bew-fill-1);
// border-color: var(--bew-border-color);
// }
.bili-comment.browser-pc {
// background-color: var(--bew-content-solid-1);
}
.reply-box .box-normal .reply-box-warp,
.reply-box .box-expand .reply-box-emoji .emoji-btn,
.reply-box .box-expand .at-btn,
.reply-box .box-expand .image-btn {
border-color: var(--bew-border-color);
}
.reply-box .box-expand .svg-icon svg path {
filter: invert(1) hue-rotate(180deg);
}
}
// #endregion
@@ -283,7 +294,8 @@
color: var(--bew-text-2) !important;
}
.bb-comment .reply-notice .notice-item, .comment-bilibili-fold .reply-notice .notice-item{
.bb-comment .reply-notice .notice-item,
.comment-bilibili-fold .reply-notice .notice-item {
background-color: var(--Ye1);
border-color: var(--Ye1);
color: var(--Or7);

View File

@@ -59,7 +59,7 @@ 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')
// channel page e.g. tv shows, movie, variety shows, mooc page