From 3985ade64337ee2901f4f608ebe6cdc3d5f0c0bb Mon Sep 17 00:00:00 2001 From: starknt <1431880400@qq.com> Date: Fri, 12 Jan 2024 23:57:27 +0800 Subject: [PATCH 01/11] fix: `global Speed` conflict --- src/contentScripts/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/contentScripts/index.ts b/src/contentScripts/index.ts index 0c2f9440..ca65c46f 100644 --- a/src/contentScripts/index.ts +++ b/src/contentScripts/index.ts @@ -138,7 +138,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) From c77b8223c8a3ea3da7ebc24cbd1d6ecb43d2f0f8 Mon Sep 17 00:00:00 2001 From: starknt <1431880400@qq.com> Date: Fri, 12 Jan 2024 23:57:34 +0800 Subject: [PATCH 02/11] refactor: improve search bar component --- src/_locales/cmn-CN.yml | 1 + src/_locales/cmn-TW.yml | 1 + src/_locales/en.yml | 1 + src/_locales/jyut.yml | 1 + src/components/SearchBar/SearchBar.vue | 92 +++++++++++++------------- 5 files changed, 50 insertions(+), 46 deletions(-) diff --git a/src/_locales/cmn-CN.yml b/src/_locales/cmn-CN.yml index 21fc6fef..cb33c692 100644 --- a/src/_locales/cmn-CN.yml +++ b/src/_locales/cmn-CN.yml @@ -293,3 +293,4 @@ watch_later: search_bar: history_title: 搜索历史 clear_history: 清空搜索历史 + placeholder: 输入关键字搜索 diff --git a/src/_locales/cmn-TW.yml b/src/_locales/cmn-TW.yml index e77cc172..90588c47 100644 --- a/src/_locales/cmn-TW.yml +++ b/src/_locales/cmn-TW.yml @@ -296,3 +296,4 @@ watch_later: search_bar: history_title: 搜尋記錄 clear_history: 清除所有搜尋記錄 + placeholder: 輸入關鍵字搜尋 diff --git a/src/_locales/en.yml b/src/_locales/en.yml index be456657..f04452a5 100644 --- a/src/_locales/en.yml +++ b/src/_locales/en.yml @@ -292,3 +292,4 @@ watch_later: search_bar: history_title: Search History clear_history: Clear search history + placeholder: Enter keywords to search diff --git a/src/_locales/jyut.yml b/src/_locales/jyut.yml index f1d91580..10287ae9 100644 --- a/src/_locales/jyut.yml +++ b/src/_locales/jyut.yml @@ -296,3 +296,4 @@ watch_later: search_bar: history_title: 搜尋記錄 clear_history: 剷晒你啲搜尋記錄 + placeholder: 键入关键字搜尋 diff --git a/src/components/SearchBar/SearchBar.vue b/src/components/SearchBar/SearchBar.vue index cc7e63c5..182fa7de 100644 --- a/src/components/SearchBar/SearchBar.vue +++ b/src/components/SearchBar/SearchBar.vue @@ -1,5 +1,6 @@ - + @@ -166,7 +173,11 @@ async function handleClearSearchHistory() { :style="{ backdropFilter: isFocus ? 'blur(15px)' : 'blur(0)' }" /> - + @@ -183,6 +194,7 @@ async function handleClearSearchHistory() { type="text" autocomplete="off" :placeholder="$t('search_bar.placeholder')" + @focus="isFocus = true" @keyup.up="handleKeyUp" @keyup.down="handleKeyDown" @keyup.enter="navigateToSearchResultPage(keyword)" @@ -206,11 +218,11 @@ async function handleClearSearchHistory() { From e2f44275e3d77faedf5b00df8b8443fb06f48c9e Mon Sep 17 00:00:00 2001 From: MengNianxiaoyao <2589141604@qq.com> Date: Mon, 15 Jan 2024 11:43:39 +0800 Subject: [PATCH 04/11] =?UTF-8?q?fix:=20=E4=B8=93=E6=A0=8F=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=BE=A7=E8=BE=B9=E6=A0=8F=E7=9B=AE=E5=BD=95=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=9E=82=E7=9B=B4=E5=B1=85=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/styles/adaptedStyles/articlesPage.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/styles/adaptedStyles/articlesPage.scss b/src/styles/adaptedStyles/articlesPage.scss index 279bf851..e86c18bb 100644 --- a/src/styles/adaptedStyles/articlesPage.scss +++ b/src/styles/adaptedStyles/articlesPage.scss @@ -3,6 +3,10 @@ line-height: unset; } + .right-side-bar .catalog{ + justify-content: center; + } + body { background-color: unset; } From 272ed0233abc1f0f5fb3f9be812f95fd9c371a06 Mon Sep 17 00:00:00 2001 From: Hakadao Date: Tue, 16 Jan 2024 23:24:19 +0800 Subject: [PATCH 05/11] revert: revert search bar code to previous version to undo recent changes --- src/_locales/cmn-CN.yml | 1 - src/_locales/cmn-TW.yml | 1 - src/_locales/en.yml | 1 - src/_locales/jyut.yml | 1 - src/components/SearchBar/SearchBar.vue | 104 +++++++++++-------------- 5 files changed, 46 insertions(+), 62 deletions(-) diff --git a/src/_locales/cmn-CN.yml b/src/_locales/cmn-CN.yml index cb33c692..21fc6fef 100644 --- a/src/_locales/cmn-CN.yml +++ b/src/_locales/cmn-CN.yml @@ -293,4 +293,3 @@ watch_later: search_bar: history_title: 搜索历史 clear_history: 清空搜索历史 - placeholder: 输入关键字搜索 diff --git a/src/_locales/cmn-TW.yml b/src/_locales/cmn-TW.yml index 90588c47..e77cc172 100644 --- a/src/_locales/cmn-TW.yml +++ b/src/_locales/cmn-TW.yml @@ -296,4 +296,3 @@ watch_later: search_bar: history_title: 搜尋記錄 clear_history: 清除所有搜尋記錄 - placeholder: 輸入關鍵字搜尋 diff --git a/src/_locales/en.yml b/src/_locales/en.yml index f04452a5..be456657 100644 --- a/src/_locales/en.yml +++ b/src/_locales/en.yml @@ -292,4 +292,3 @@ watch_later: search_bar: history_title: Search History clear_history: Clear search history - placeholder: Enter keywords to search diff --git a/src/_locales/jyut.yml b/src/_locales/jyut.yml index 10287ae9..f1d91580 100644 --- a/src/_locales/jyut.yml +++ b/src/_locales/jyut.yml @@ -296,4 +296,3 @@ watch_later: search_bar: history_title: 搜尋記錄 clear_history: 剷晒你啲搜尋記錄 - placeholder: 键入关键字搜尋 diff --git a/src/components/SearchBar/SearchBar.vue b/src/components/SearchBar/SearchBar.vue index d3bc8c21..e1766e71 100644 --- a/src/components/SearchBar/SearchBar.vue +++ b/src/components/SearchBar/SearchBar.vue @@ -1,6 +1,5 @@ - + @@ -173,16 +158,12 @@ async function handleClearSearchHistory() { :style="{ backdropFilter: isFocus ? 'blur(15px)' : 'blur(0)' }" /> - + + {}" > - + {{ $t('search_bar.history_title') }} @@ -251,10 +233,16 @@ async function handleClearSearchHistory() { + + + + Date: Tue, 16 Jan 2024 23:26:41 +0800 Subject: [PATCH 06/11] =?UTF-8?q?fix:=20=E4=BB=8E=E7=A8=8D=E5=90=8E?= =?UTF-8?q?=E5=86=8D=E7=9C=8B=E6=89=93=E5=BC=80=E8=A7=86=E9=A2=91=E6=97=B6?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=B7=B3=E8=BD=AC=20#180?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/contentScripts/views/App.vue | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/contentScripts/views/App.vue b/src/contentScripts/views/App.vue index ada9b72a..cd1fa532 100644 --- a/src/contentScripts/views/App.vue +++ b/src/contentScripts/views/App.vue @@ -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) From 3bcecb1b7c3bead9513c81c42f8d3d90f5627585 Mon Sep 17 00:00:00 2001 From: Hakadao Date: Tue, 16 Jan 2024 23:56:38 +0800 Subject: [PATCH 07/11] style: adapt to unadapted areas --- src/styles/adaptedStyles/channelPage.scss | 72 +++++++++++++++++------ 1 file changed, 53 insertions(+), 19 deletions(-) diff --git a/src/styles/adaptedStyles/channelPage.scss b/src/styles/adaptedStyles/channelPage.scss index 28ea9d7a..ad581795 100644 --- a/src/styles/adaptedStyles/channelPage.scss +++ b/src/styles/adaptedStyles/channelPage.scss @@ -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,14 @@ .channel-container .el-input__inner { box-shadow: 0 0 0 1px var(--bew-border-color) inset; } + + .b-img { + background-color: var(--bew-fill-4); + } + + .season-cover { + background-color: transparent; + } } + // #endregion } From e42a61e0e4528cd202dead17d5b0a32cbb684c53 Mon Sep 17 00:00:00 2001 From: Hakadao Date: Wed, 17 Jan 2024 00:29:16 +0800 Subject: [PATCH 08/11] style: adjust areas not yet compatible with dark mode --- src/styles/adaptedStyles/channelPage.scss | 4 ---- src/styles/adaptedStyles/comments.scss | 22 +++++++++++++++++----- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/styles/adaptedStyles/channelPage.scss b/src/styles/adaptedStyles/channelPage.scss index ad581795..90c9bb33 100644 --- a/src/styles/adaptedStyles/channelPage.scss +++ b/src/styles/adaptedStyles/channelPage.scss @@ -70,10 +70,6 @@ box-shadow: 0 0 0 1px var(--bew-border-color) inset; } - .b-img { - background-color: var(--bew-fill-4); - } - .season-cover { background-color: transparent; } diff --git a/src/styles/adaptedStyles/comments.scss b/src/styles/adaptedStyles/comments.scss index f46b5703..4eeec120 100644 --- a/src/styles/adaptedStyles/comments.scss +++ b/src/styles/adaptedStyles/comments.scss @@ -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); From 781b2c07d781dddb02662b875e46c58eb8984f20 Mon Sep 17 00:00:00 2001 From: Hakadao Date: Wed, 17 Jan 2024 00:29:34 +0800 Subject: [PATCH 09/11] chore: adjust regex --- src/styles/adaptedStyles/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/adaptedStyles/index.ts b/src/styles/adaptedStyles/index.ts index e139cf0e..7084de32 100644 --- a/src/styles/adaptedStyles/index.ts +++ b/src/styles/adaptedStyles/index.ts @@ -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 From d459603a5b27874883263a19b0b654fc872dd206 Mon Sep 17 00:00:00 2001 From: Hakadao Date: Wed, 17 Jan 2024 00:30:51 +0800 Subject: [PATCH 10/11] chore: update version number --- .github/workflows/changelog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index b61776d4..9e51c045 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -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}]' From 61710d0cd0805a842caa7eeb536ef614ec74eba0 Mon Sep 17 00:00:00 2001 From: Hakadao Date: Wed, 17 Jan 2024 00:33:12 +0800 Subject: [PATCH 11/11] chore(main): release 0.14.1 Signed-off-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 19 +++++++++++++++++++ package.json | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06bcd1ef..a735ba96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/package.json b/package.json index efea5d59..3aa722e9 100644 --- a/package.json +++ b/package.json @@ -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.",