Skip to content

Commit

Permalink
some minor optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
omegaee committed Sep 2, 2024
1 parent b7186ea commit 348dc51
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/core/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { HookTask, recordAndSend } from "./core";

const hookTaskMap: Record<string, Omit<HookTask, 'name'>> = {

'static iframe': {
'iframe html hook': {
onlyOnceEnable: true,
condition: (fh) => fh.conf?.hookBlankIframe,
onEnable: (fh) => {
Expand All @@ -31,7 +31,7 @@ const hookTaskMap: Record<string, Omit<HookTask, 'name'>> = {
},
},

'script iframe': {
'iframe script hook': {
condition: (fh) => fh.conf?.hookBlankIframe,
onEnable: (fh) => {
if(!fh.rawObjects.appendChild || !fh.rawObjects.insertBefore || !fh.rawObjects.replaceChild){
Expand Down
4 changes: 2 additions & 2 deletions src/locales/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"e-language": "Language",
"seed": "Global Seed",
"hook-net-request": "Web Request Hooks",
"hook-blank-iframe": "Blank Iframe Hooks"
"hook-iframe": "Iframe Hooks"
},
"desc": {
"equipment": "Equipment Info\n\n**navigator.appVersion**\n\n**navigator.userAgent**\n\n**navigator.userAgentData**",
Expand All @@ -64,7 +64,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\n**Note that turning it on may affect the styling of some pages**\n\nSupported configs: **Equipment Info**\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"
"hook-iframe": "When turned on, Can proxy **All Iframe** content"
}
},
"tip": {
Expand Down
4 changes: 2 additions & 2 deletions src/locales/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"e-language": "语言",
"seed": "全局种子",
"hook-net-request": "网络请求钩子",
"hook-blank-iframe": "空白源Iframe钩子"
"hook-iframe": "Iframe钩子"
},
"desc": {
"equipment": "设备信息\n\n**navigator.appVersion**\n\n**navigator.userAgent**\n\n**navigator.userAgentData**",
Expand All @@ -64,7 +64,7 @@
"e-language": "语言",
"seed": "全局种子,作用于 **根据全局种子随机值** 选项",
"hook-net-request": "开启后,会影响所有网络请求\n\n**注意,开启后可能会影响某些网页的样式**\n\n支持配置:**设备信息**\n\n支持选项:**每次启动浏览器随机值**、**根据全局种子随机值**、**自定义值**",
"hook-blank-iframe": "开启后,能代理**空白源Iframe**的内容"
"hook-iframe": "开启后,能代理**所有Iframe**的内容"
}
},
"tip": {
Expand Down
4 changes: 2 additions & 2 deletions src/popup/f-config/other.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ export const OtherConfig = ({ config }: OtherConfigProps) => {
value={config?.hookNetRequest} />

<FWorkItem.Switch keyPrefix='hookBlankIframe'
title={t('item.title.hook-blank-iframe')}
desc={t('item.desc.hook-blank-iframe')}
title={t('item.title.hook-iframe')}
desc={t('item.desc.hook-iframe')}
value={config?.hookBlankIframe} />
</section>
}
Expand Down

0 comments on commit 348dc51

Please sign in to comment.