Skip to content

Commit

Permalink
Improved some content
Browse files Browse the repository at this point in the history
  • Loading branch information
omegaee committed Jul 17, 2024
1 parent 3cd977c commit 4991914
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,7 @@

# 已知问题
> 若有解决方案,欢迎指正
- 由于配置需要异步读取,核心脚本注入会有延时,可能会错过某些极端的情况
- ***由于配置需要异步读取,核心脚本注入会有延时,可能会错过某些情况**
- 网络请求钩子,是通过`declarativeNetRequest`实现的
- **无法支持白名单**
- 目前并未支持Sec-CH-UA系列请求头
6 changes: 4 additions & 2 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,7 @@

# Known Issues
> If there is a solution, you are welcome to propose it!
- Since the configuration needs to be read asynchronously, the core script injection will have a delay and may miss some extreme cases.

- **Since the configuration needs to be read asynchronously, the core script injection will have a delay and may miss some extreme cases.**
- Web request hooks, which are implemented through `declarativeNetRequest`
- **Unable to support whitelisting**
- The Sec-CH-UA series request header is not currently supported.
2 changes: 1 addition & 1 deletion src/background/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const genDefaultLocalStorage = (): LocalStorage => {
},
},
language: navigator.language,
hookNetRequest: true,
hookNetRequest: false,
hookBlankIframe: true,
},
whitelist: []
Expand Down
2 changes: 1 addition & 1 deletion src/components/data/highlight.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export type HighlightProps = {
* 文本高亮
*/
export const Highlight = function ({ className, text, keyword, ignoreCase }: HighlightProps) {
if(keyword === undefined || keyword === null) return text
if(keyword === undefined || keyword === null) return <span>{text}</span>
if(Array.isArray(keyword)){
if(keyword.length === 0) return <span className={className}>{text}</span>
return <span className={className}>{text.split(new RegExp(keyword.map((item) => `${item}`).join('|'), ignoreCase ? "gi" : "g"))
Expand Down
2 changes: 1 addition & 1 deletion src/locales/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

"e-language": "Language",
"seed": "Global Seed, Acts on **Randomization based on global seed** Options",
"hook-net-request": "When turned on, it affects all network requests\n\nSupported configs: **Equipment Info (navigator.userAgent)**\n\nSupported options: **Every time the browser starts a random** & **Randomization based on global seed** & **Custom value**",
"hook-net-request": "When turned on, it affects all network requests\n\n**Note that turning it on affects the styling of some web pages**\n\nSupported configs: **Equipment Info (navigator.userAgent)**\n\nSupported options: **Every time the browser starts a random** & **Randomization based on global seed** & **Custom value**",
"hook-blank-iframe": "When turned on, Can proxy **Blank Source Iframe** content"
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/locales/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

"e-language": "语言",
"seed": "全局种子,作用于 **根据全局种子随机值** 选项",
"hook-net-request": "开启后,会影响所有网络请求\n\n支持配置:**设备信息(navigator.userAgent)**\n\n支持选项:**每次启动浏览器随机值**、**根据全局种子随机值**、**自定义值**",
"hook-net-request": "开启后,会影响所有网络请求\n\n**注意,开启后会影响某些网页的样式**\n\n支持配置:**设备信息(navigator.userAgent)**\n\n支持选项:**每次启动浏览器随机值**、**根据全局种子随机值**、**自定义值**",
"hook-blank-iframe": "开启后,能代理**空白源Iframe**的内容"
}
},
Expand Down
5 changes: 0 additions & 5 deletions src/utils/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ const equipmentInfos: EquipmentInfo[] = [
appVersion: '5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3 Edge/16.16299',
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3 Edge/16.16299',
},
{
platform: 'Linux armv8l',
appVersion: '5.0 (Linux; Android 9; SM-G950F Build/PPR1.180610.011) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.101 Mobile Safari/537.36',
userAgent: 'Mozilla/5.0 (Linux; Android 9; SM-G950F Build/PPR1.180610.011) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.101 Mobile Safari/537.36',
},
{
platform: 'MacIntel',
appVersion: '5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 OPR/70.0.3728.71',
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ export default defineConfig({
'@': resolve(__dirname, 'src'),
},
},
server: { port: 3000, hmr: { port: 3000 } },
// server: { port: 3000, hmr: { port: 3000 } },
})

0 comments on commit 4991914

Please sign in to comment.