mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
Merge branch 'main' into bugfixes
This commit is contained in:
@@ -10,15 +10,8 @@
|
||||
|
||||
<p align="center">只需对您的 Bilibili 主页进行一些小更改即可。</p>
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## 👋 介绍
|
||||
|
||||
@@ -34,7 +27,7 @@ BewlyBewly 是一个用于 BiliBili 的浏览器扩展,旨在通过重新设
|
||||
|
||||
- Chrome: <https://chromewebstore.google.com/detail/bewlybewly/bbbiejemhfihiooipfcjmjmbfdmobobp>
|
||||
- Edge: <https://microsoftedge.microsoft.com/addons/detail/bewlybewly/kceadhehfjdiakpiphpjgolbgehjdmja>
|
||||
- Firefox: **我需要一些帮助!!!!!!!!!!!!!!!!!! ( ;∀;)**
|
||||
- Firefox: <https://addons.mozilla.org/lt/firefox/addon/bewlybewly/>
|
||||
|
||||
### 本地安装
|
||||
|
||||
@@ -69,7 +62,9 @@ BewlyBewly 是一个用于 BiliBili 的浏览器扩展,旨在通过重新设
|
||||
|
||||
</details>
|
||||
|
||||
## 🔧 开发 & 构建
|
||||
## 🔧 开发和构建项目
|
||||
|
||||
请使用 dev 分支进行开发
|
||||
|
||||
### Chrome or Edge browser
|
||||
|
||||
@@ -83,7 +78,7 @@ pnpm dev
|
||||
```
|
||||
|
||||
然后**在浏览器中使用 `加载已解压的拓展程序` 加载 `extension` 文件夹**。
|
||||
每次修改后,您需要单击 [重新加载](https://chromewebstore.google.com/detail/extensions-reloader/fimgfedafeadlieiabdeeaodndnlbhid) 按钮并刷新页面以确保应用更改。
|
||||
每次修改后,您需要单击 [Reload Extensions](https://chromewebstore.google.com/detail/extensions-reloader/fimgfedafeadlieiabdeeaodndnlbhid) 按钮并刷新页面以确保应用更改。
|
||||
|
||||
#### 构建 (Chrome or Edge)
|
||||
|
||||
@@ -99,8 +94,6 @@ pnpm build
|
||||
|
||||
### Firefox browser
|
||||
|
||||
在此之前,请使用 `dev-firefox` 分支来执行以下操作。它可能包含一些错误或不清晰的代码,欢迎您帮助解决这些问题!:D
|
||||
|
||||
<details>
|
||||
<summary>Firefox</summary>
|
||||
|
||||
|
||||
@@ -10,15 +10,8 @@
|
||||
|
||||
<p align="center">只需對您的 Bilibili 主頁進行一些小改動就好。</p>
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## 👋 介紹
|
||||
|
||||
@@ -34,7 +27,7 @@ BewlyBewly 是一個針對 BiliBili 的瀏覽器擴充功能,旨在透過重
|
||||
|
||||
- Chrome: <https://chromewebstore.google.com/detail/bewlybewly/bbbiejemhfihiooipfcjmjmbfdmobobp>
|
||||
- Edge: <https://microsoftedge.microsoft.com/addons/detail/bewlybewly/kceadhehfjdiakpiphpjgolbgehjdmja>
|
||||
- Firefox: **我需要幫助!!!!!!!!!!!!!!!!!! ( ;∀;)**
|
||||
- Firefox: <https://addons.mozilla.org/lt/firefox/addon/bewlybewly/>
|
||||
|
||||
### 離線安裝
|
||||
|
||||
@@ -69,7 +62,9 @@ BewlyBewly 是一個針對 BiliBili 的瀏覽器擴充功能,旨在透過重
|
||||
|
||||
</details>
|
||||
|
||||
## 🔧 開發與建置
|
||||
## 🔧 開發與建置專案
|
||||
|
||||
請使用 dev 分支進行開發
|
||||
|
||||
### Chrome or Edge browser
|
||||
|
||||
@@ -99,8 +94,6 @@ pnpm build
|
||||
|
||||
### Firefox browser
|
||||
|
||||
在那之前,請使用 `dev-firefox` 分支來進行以下操作。它可能包含一些錯誤或不清楚的代碼,歡迎您幫忙解決這些問題!:D
|
||||
|
||||
<details>
|
||||
<summary>Firefox browser</summary>
|
||||
|
||||
|
||||
@@ -10,15 +10,8 @@
|
||||
|
||||
<p align="center">係咁以執吓你嘅 Bilibili 主頁。</p>
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## 👋 介紹
|
||||
|
||||
@@ -34,7 +27,7 @@ BewlyBewly 係一個用於 BiliBili 嘅瀏覽器延伸功能,目的係透過
|
||||
|
||||
- Chrome: <https://chromewebstore.google.com/detail/bewlybewly/bbbiejemhfihiooipfcjmjmbfdmobobp>
|
||||
- Edge: <https://microsoftedge.microsoft.com/addons/detail/bewlybewly/kceadhehfjdiakpiphpjgolbgehjdmja>
|
||||
- Firefox: **我要人幫手!!!!!!!!!!!!!!!!!! ( ;∀;)**
|
||||
- Firefox: <https://addons.mozilla.org/lt/firefox/addon/bewlybewly/>
|
||||
|
||||
### 離線單嘢
|
||||
|
||||
@@ -69,7 +62,9 @@ BewlyBewly 係一個用於 BiliBili 嘅瀏覽器延伸功能,目的係透過
|
||||
|
||||
</details>
|
||||
|
||||
## 🔧 開發同建置
|
||||
## 🔧 開發同建置專案
|
||||
|
||||
請使用 dev 分支進行開發
|
||||
|
||||
### Chrome or Edge browser
|
||||
|
||||
@@ -99,8 +94,6 @@ pnpm build
|
||||
|
||||
### Firefox browser
|
||||
|
||||
整之前呢,請用 dev-firefox 分支去做下低嘅操作。佢可能會有啲 bugs 抑或亂晒籠嘅程式碼,歡迎閣下幫手解決呢啲問題!:D
|
||||
|
||||
<details>
|
||||
<summary>Firefox</summary>
|
||||
|
||||
|
||||
19
README.md
19
README.md
@@ -1,6 +1,6 @@
|
||||
# BewlyBewly
|
||||
|
||||
English | [简体中文](README-cmn_CN.md) | [正體中文](README-cmn_TW.md) | [廣東話](README-jyut.md)
|
||||
English | [官话 - 简体中文](README-cmn_CN.md) | [官話 - 正體中文](README-cmn_TW.md) | [廣東話](README-jyut.md)
|
||||
|
||||
<p align="center" style="margin-bottom: 0px !important;">
|
||||
<img width="150" src="https://user-images.githubusercontent.com/33394391/160250512-410b71fc-7f25-4caf-b850-429227ff082a.png"><br/>
|
||||
@@ -10,15 +10,8 @@ English | [简体中文](README-cmn_CN.md) | [正體中文](README-cmn_TW.md) |
|
||||
|
||||
<p align="center">Just make a few small changes to your Bilibili homepage.</p>
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## 👋 Introduction
|
||||
|
||||
@@ -34,7 +27,7 @@ Even in the Edge browser, we strongly recommend you install it in the Chrome web
|
||||
|
||||
- Chrome: <https://chromewebstore.google.com/detail/bewlybewly/bbbiejemhfihiooipfcjmjmbfdmobobp>
|
||||
- Edge: <https://microsoftedge.microsoft.com/addons/detail/bewlybewly/kceadhehfjdiakpiphpjgolbgehjdmja>
|
||||
- Firefox: **I NEED SOME HELP!!!!!!!!!!!!!!!!!! ( ;∀;)**
|
||||
- Firefox: <https://addons.mozilla.org/lt/firefox/addon/bewlybewly/>
|
||||
|
||||
### Local Installation
|
||||
|
||||
@@ -71,6 +64,8 @@ Opening the `edge://extensions` page in the Edge or `chrome://extensions` page i
|
||||
|
||||
## 🔧 Development & Build
|
||||
|
||||
Please use the dev branch for development
|
||||
|
||||
### Chrome or Edge browser
|
||||
|
||||
<details>
|
||||
@@ -99,8 +94,6 @@ And then pack files under the `extension`
|
||||
|
||||
### Firefox browser
|
||||
|
||||
Before that, please use the `dev-firefox` branch to perform the operations below. It may contain some bugs or unclear code, and your help in addressing these issues is welcome! :D
|
||||
|
||||
<details>
|
||||
<summary>Firefox browser</summary>
|
||||
|
||||
|
||||
@@ -8,135 +8,5 @@ browser.runtime.onInstalled.addListener((): void => {
|
||||
console.log('Extension installed')
|
||||
})
|
||||
|
||||
// const previousTabId = 0
|
||||
|
||||
// communication example: send previous tab title from background page
|
||||
// see shim.d.ts for type declaration
|
||||
// browser.tabs.onActivated.addListener(async ({ tabId }) => {
|
||||
// if (!previousTabId) {
|
||||
// previousTabId = tabId
|
||||
// return
|
||||
// }
|
||||
|
||||
// let tab: Tabs.Tab
|
||||
|
||||
// try {
|
||||
// tab = await browser.tabs.get(previousTabId)
|
||||
// previousTabId = tabId
|
||||
// }
|
||||
// catch {
|
||||
// return
|
||||
// }
|
||||
|
||||
// // eslint-disable-next-line no-console
|
||||
// console.log('previous tab', tab)
|
||||
// sendMessage('tab-prev', { title: tab.title }, { context: 'content-script', tabId })
|
||||
// })
|
||||
|
||||
// onMessage('get-current-tab', async () => {
|
||||
// try {
|
||||
// const tab = await browser.tabs.get(previousTabId)
|
||||
// return {
|
||||
// title: tab?.title,
|
||||
// }
|
||||
// }
|
||||
// catch {
|
||||
// return {
|
||||
// title: undefined,
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
|
||||
// // preinsert css
|
||||
// browser.tabs.onUpdated.addListener((tabId: number, changInfo: Tabs.OnUpdatedChangeInfoType, tab: Tabs.Tab) => {
|
||||
// if (
|
||||
// // homepage
|
||||
// /https?:\/\/bilibili.com\/?$/.test(`${tab.url}`)
|
||||
// || /https?:\/\/bilibili.com\/index.html\/?$/.test(`${tab.url}`)
|
||||
// || /https?:\/\/www.bilibili.com\/index.html\/?$/.test(`${tab.url}`)
|
||||
// || /https?:\/\/www.bilibili.com\/?$/.test(`${tab.url}`)
|
||||
// || /https?:\/\/bilibili.com\/\?spm_id_from=.*/.test(`${tab.url}`)
|
||||
// || /https?:\/\/www.bilibili.com\/\?spm_id_from=(.)*/.test(`${tab.url}`)
|
||||
|
||||
// // video page
|
||||
// || /https?:\/\/(www.)?bilibili.com\/video\/.*/.test(`${tab.url}`)
|
||||
// // watch later playlist
|
||||
// || /https?:\/\/(www.)?bilibili.com\/list\/watchlater.*/.test(`${tab.url}`)
|
||||
// // favorite playlist
|
||||
// || /https?:\/\/(www.)?bilibili.com\/list\/ml.*/.test(`${tab.url}`)
|
||||
// // search page
|
||||
// || /https?:\/\/search.bilibili.com\.*/.test(`${tab.url}`)
|
||||
// // moments page
|
||||
// || /https?:\/\/t.bilibili.com\.*/.test(`${tab.url}`)
|
||||
// ) {
|
||||
// if (changInfo.status === 'loading') {
|
||||
// // browser.scripting.insertCSS({
|
||||
// // css: `
|
||||
// // body {
|
||||
// // opacity: 0;
|
||||
// // transition: opacity 0.5s;
|
||||
// // overflow-y: hidden;
|
||||
// // pointer-events: none;
|
||||
// // }
|
||||
// // `,
|
||||
// // target: {
|
||||
// // tabId,
|
||||
// // },
|
||||
// // })
|
||||
|
||||
// browser.scripting.insertCSS({
|
||||
// css: resetCss,
|
||||
// target: {
|
||||
// tabId,
|
||||
// },
|
||||
// })
|
||||
|
||||
// // If it not a macOS, we will inject CSS to design the scrollbar
|
||||
// if (!navigator.userAgent.includes('Mac OS X')) {
|
||||
// browser.scripting.insertCSS({
|
||||
// css: `
|
||||
// ::-webkit-scrollbar {
|
||||
// width: 8px;
|
||||
// height: 8px;
|
||||
// }
|
||||
|
||||
// ::-webkit-scrollbar-track {
|
||||
// background: transparent;
|
||||
// }
|
||||
|
||||
// html > ::-webkit-scrollbar-track {
|
||||
// background: var(--bew-bg);
|
||||
// }
|
||||
|
||||
// ::-webkit-scrollbar-thumb {
|
||||
// background-color: rgba(120, 120, 122, 0.6);
|
||||
// border-radius: 20px;
|
||||
// }
|
||||
|
||||
// ::-webkit-scrollbar-corner {
|
||||
// background: transparent;
|
||||
// }
|
||||
// `,
|
||||
// target: { tabId },
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// else if (changInfo.status === 'complete') {
|
||||
// // const css = `
|
||||
// // body {
|
||||
// // opacity: 1;
|
||||
// // overflow-y: auto;
|
||||
// // pointer-events: auto;
|
||||
// // }
|
||||
// // `
|
||||
|
||||
// // browser.scripting.insertCSS({
|
||||
// // css,
|
||||
// // target: { tabId },
|
||||
// // })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
|
||||
// Setup all message listeners
|
||||
setupAllMsgLstnrs()
|
||||
|
||||
Reference in New Issue
Block a user