Skip to content

Commit

Permalink
Merge pull request #52 from BewlyBewly/dev
Browse files Browse the repository at this point in the history
[pull] dev from BewlyBewly:dev
  • Loading branch information
MengNianxiaoyao authored Apr 30, 2024
2 parents 00a8e14 + b0e31d0 commit 8f91767
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
token: ${{ secrets.RELEASE_TOKEN }}
release-type: node
package-name: release-please-action
release-as: 0.18.1
release-as: 0.18.2
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}]'
default-branch: main
6 changes: 3 additions & 3 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MD013:
# Number of characters
line_length: 120
MD013: false

MD029: false

MD033:
allowed_elements: [a, br, img, p, h1, details, summary]
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## [0.18.2](https://github.com/BewlyBewly/BewlyBewly/compare/v0.18.1...v0.18.2) (2024-04-28)


### Bug Fixes

* can't get local image background for home search view ([6d6d7c7](https://github.com/BewlyBewly/BewlyBewly/commit/6d6d7c7a3fd2543ddb186a88b870afd3b3b80eca)), closes [#687](https://github.com/BewlyBewly/BewlyBewly/issues/687)
* firefox rule ([#690](https://github.com/BewlyBewly/BewlyBewly/issues/690)) ([beff7d0](https://github.com/BewlyBewly/BewlyBewly/commit/beff7d04ee2a223c65919e1e038a721e0ce62957))
* firefox rule ([#691](https://github.com/BewlyBewly/BewlyBewly/issues/691)) ([e13af11](https://github.com/BewlyBewly/BewlyBewly/commit/e13af11121dcc786b73f46487db63c7392e27d45))
* frosted glass effect not working in firefox ([2c4e44f](https://github.com/BewlyBewly/BewlyBewly/commit/2c4e44f21328e5a896c496c8c23664865443ad92))


### Style Changes

* **userSpacePage:** adapt unadapted sections ([df429ba](https://github.com/BewlyBewly/BewlyBewly/commit/df429bad8561afb0bafb065849c4af307e1cceb4))

## [0.18.1](https://github.com/BewlyBewly/BewlyBewly/compare/v0.18.0...v0.18.1) (2024-04-27)


Expand Down
6 changes: 5 additions & 1 deletion docs/CONTRIBUTING-cmn_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@
```

2. 在地址栏输入 `chrome://extensions/` (Chrome), `edge://extensions/` (Edge) 并按回车

3. 打开 `开发者模式` 并点击 `加载已解压的拓展程序`
<br/>

<img width="655" alt="Snipaste_2022-03-27_18-17-04" src="https://user-images.githubusercontent.com/33394391/160276882-13da0484-92c1-47dd-add8-7655c5c2bf1c.png">
<br/>
<img width="655" alt="image" src="https://user-images.githubusercontent.com/33394391/232246901-e3544c16-bde2-480d-b770-ca5242793963.png">

4. 在浏览器中加载生成的 `extension/` 文件夹

每次修改后,您需要单击 [Reload Extensions](https://chromewebstore.google.com/detail/extensions-reloader/fimgfedafeadlieiabdeeaodndnlbhid) 按钮并刷新页面以确保应用更改。
Expand Down Expand Up @@ -54,7 +56,9 @@ pnpm dev
```

2. 在浏览器输入 `about:addons` 之后点击 `Extensions` 然后 `Debug Add-ons`

<img width="655" alt="image" src="https://github.com/hakadao/BewlyBewly/assets/33394391/7c49e4ca-2a87-4c56-bc00-3259d6eba128">

3. 在浏览器中加载生成的 `extension-firefox/` 文件夹

#### 构建 (Firefox)
Expand Down
7 changes: 5 additions & 2 deletions docs/CONTRIBUTING-cmn_TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ pnpm dev
```

2. 在地址欄輸入 `chrome://extensions/`(Chrome),`edge://extensions/`(Edge)並按 Enter 鍵

3. 啟用 `開發者模式` 並點擊 `載入解壓縮`
<br/>

<img width="655" alt="Snipaste_2022-03-27_18-17-04" src="https://user-images.githubusercontent.com/33394391/160276882-13da0484-92c1-47dd-add8-7655c5c2bf1c.png">
<br/>
<img width="655" alt="image" src="https://user-images.githubusercontent.com/33394391/232246901-e3544c16-bde2-480d-b770-ca5242793963.png">

4. 在瀏覽器中載入生成的 `extension/` 資料夾

每次修改後,您需要點選 [Extensions Reloader](https://chromewebstore.google.com/detail/extensions-reloader/fimgfedafeadlieiabdeeaodndnlbhid) 按鈕,然後重新整理頁面,以確保更改生效。
Expand Down Expand Up @@ -53,8 +55,9 @@ pnpm dev
```

2. 在瀏覽器中輸入 `about:addons`,點擊 `Extensions` 然後 `Debug Add-ons`
<br/>

<img width="655" alt="image" src="https://github.com/hakadao/BewlyBewly/assets/33394391/7c49e4ca-2a87-4c56-bc00-3259d6eba128">

3. 然後在瀏覽器中使用 `extension-firefox/` 資料夾載入此擴充功能。

#### 構建(Firefox)
Expand Down
6 changes: 5 additions & 1 deletion docs/CONTRIBUTING-jyut.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ pnpm dev
```

2. 喺 Chrome 入邊打開 `chrome://extensions` 頁面抑或喺 Edge 度打開 `edge://extensions` 頁面

3. 打開`開發者模式`,撳`載入解壓縮`
<br/>

<img width="655" alt="Snipaste_2022-03-27_18-17-04" src="https://user-images.githubusercontent.com/33394391/160276882-13da0484-92c1-47dd-add8-7655c5c2bf1c.png">
<br/>
<img width="655" alt="image" src="https://user-images.githubusercontent.com/33394391/232246901-e3544c16-bde2-480d-b770-ca5242793963.png">

4. 喺瀏覽器度載入產生嘅 `extension/` 資料夾

每一次執過 code 之後,你都要撳 [Extensions Reloader](https://chromewebstore.google.com/detail/extensions-reloader/fimgfedafeadlieiabdeeaodndnlbhid) 粒掣,然之後 refresh 個 page,確保係有效果。
Expand Down Expand Up @@ -53,7 +55,9 @@ pnpm dev
```

2. 喺瀏覽器度輸入 `about:addons`,撳 `Extensions` 然之後 `Debug Add-ons`

<img width="655" alt="image" src="https://github.com/hakadao/BewlyBewly/assets/33394391/7c49e4ca-2a87-4c56-bc00-3259d6eba128">

3. 喺瀏覽器度載入產生嘅 `extension-firefox/` 資料夾

#### 建立(Firefox)
Expand Down
7 changes: 5 additions & 2 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ pnpm dev
```

2. Enter `chrome://extensions/` (Chrome), `edge://extensions/` (Edge) in the address bar and press Enter

3. Enable `Developer Mode` and click `Load unpacked`
<br/>

<img width="655" alt="Snipaste_2022-03-27_18-17-04" src="https://user-images.githubusercontent.com/33394391/160276882-13da0484-92c1-47dd-add8-7655c5c2bf1c.png">
<br/>
<img width="655" alt="image" src="https://user-images.githubusercontent.com/33394391/232246901-e3544c16-bde2-480d-b770-ca5242793963.png">

4. Load the generated `extension/` folder in the browser

After each modification, you need to click the [Reload Extensions](https://chromewebstore.google.com/detail/extensions-reloader/fimgfedafeadlieiabdeeaodndnlbhid) button and refresh the page to apply the changes.
Expand Down Expand Up @@ -53,8 +55,9 @@ pnpm dev
```

2. In the browser, enter `about:addons`, click on `Extensions` and then `Debug Add-ons`
<br/>

<img width="655" alt="image" src="https://github.com/hakadao/BewlyBewly/assets/33394391/7c49e4ca-2a87-4c56-bc00-3259d6eba128">

3. Load the generated `extension-firefox/` folder in the browser

#### Building (Firefox)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bewly-bewly",
"displayName": "BewlyBewly",
"version": "0.18.1",
"version": "0.18.2",
"private": true,
"packageManager": "[email protected]",
"description": "Just make a few small changes to your Bilibili homepage.",
Expand Down
7 changes: 6 additions & 1 deletion src/background/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,22 @@ browser.runtime.onInstalled.addListener((): void => {
console.log('Extension installed')
})

function isExtensionUri(url: string) {
return new URL(url).origin === new URL(browser.runtime.getURL('')).origin
}

// eslint-disable-next-line node/prefer-global/process
if (process.env.FIREFOX) {
browser.webRequest.onBeforeSendHeaders.addListener(
(details) => {
const requestHeaders: browser.WebRequest.HttpHeaders = []
if (details.documentUrl) {
const url = new URL(details.documentUrl)
const extensionUri = isExtensionUri(details.documentUrl)
details.requestHeaders = details.requestHeaders || []
for (let i = 0; i < details.requestHeaders.length; i++) {
if (details.requestHeaders[i].name.toLowerCase() === 'origin' || details.requestHeaders[i].name.toLowerCase() === 'referer')
requestHeaders.push({ name: details.requestHeaders[i].name, value: url.origin })
requestHeaders.push({ name: details.requestHeaders[i].name, value: extensionUri ? 'https://www.bilibili.com' : url.origin })
else
requestHeaders.push(details.requestHeaders[i])
}
Expand Down
2 changes: 1 addition & 1 deletion src/contentScripts/views/Favorites/Favorites.vue
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ function isMusic(item: FavoriteResource) {
>
<div
absolute w-full h-full backdrop-blur-40px
bg="$bew-fill-4" mix-blend-luminosity
bg="$bew-fill-4"
/>
<img
v-if="activatedCategoryCover"
Expand Down
2 changes: 1 addition & 1 deletion src/contentScripts/views/Home/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function toggleTabContentLoading(loading: boolean) {
pos="absolute left-0 top-0" w-full h-inherit bg="cover center" z-1
pointer-events-none
:style="{
backgroundImage: `url(${getBewlyImage(settings.searchPageWallpaper)})`,
backgroundImage: `url('${getBewlyImage(settings.searchPageWallpaper)}')`,
backgroundAttachment: settings.searchPageModeWallpaperFixed ? 'fixed' : 'unset',
}"
/>
Expand Down
2 changes: 1 addition & 1 deletion src/contentScripts/views/WatchLater/WatchLater.vue
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ function jumpToLoginPage() {
>
<div
absolute w-full h-full backdrop-blur-40px
bg="$bew-fill-4" mix-blend-luminosity
bg="$bew-fill-4"
/>
<img
v-if="watchLaterList[0]"
Expand Down
16 changes: 11 additions & 5 deletions src/styles/adaptedStyles/userSpacePage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
background-color: unset;
}

.favInfo-box .favInfo-details .fav-options .fav-play:hover {
.favInfo-box .favInfo-details .fav-options .fav-play:hover,
.favInfo-box .collection-details .collection-btn:hover {
color: white !important;
}

Expand Down Expand Up @@ -151,15 +152,17 @@
#page-series-detail .channel-option .modify-channel,
.game-card__btn,
.be-tags-container .tag.new-tag,
#page-fav .fav-sidenav .fav-item.cur:hover .icon-cursor {
#page-fav .fav-sidenav .fav-item.cur:hover .icon-cursor,
.favInfo-box .collection-details .collection-btn {
background-color: var(--bew-theme-color);
}

.btn.primary:focus,
.btn.primary:hover,
.h .h-follow:hover,
.game-card__btn:hover,
.favInfo-box .favInfo-details .fav-options .fav-play:hover {
.favInfo-box .favInfo-details .fav-options .fav-play:hover,
.favInfo-box .collection-details .collection-btn:hover {
background-color: var(--bew-theme-color-80);
}

Expand Down Expand Up @@ -256,7 +259,9 @@
#page-index .col-1,
#page-index .col-2 .section,
#page-dynamic .col-2 .section,
.game-card .game-card__info-title {
.game-card .game-card__info-title,
.favInfo-box .collection-details .title .icon-heji,
.favInfo-box .collection-details .title .title-name {
color: var(--bew-text-1);
}

Expand Down Expand Up @@ -391,7 +396,8 @@
#page-index .col-1 .section .more,
#page-index .channel .section-right-options .play-all-channel,
.section .operation,
.section .count {
.section .count,
.large-item .cover img {
border-color: var(--bew-border-color);
}

Expand Down

0 comments on commit 8f91767

Please sign in to comment.