Skip to content

Commit

Permalink
Merge pull request #267 from GuoXiCheng/dev-c
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
GuoXiCheng authored Sep 28, 2024
2 parents 7ed5c46 + d0ba865 commit e510bd1
Show file tree
Hide file tree
Showing 14 changed files with 175 additions and 57 deletions.
93 changes: 41 additions & 52 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -40,78 +40,63 @@ export default defineConfig(
],
},
{
text: "使用方法",
text: "主要功能",
items: [
{
text: "启用无障碍服务",
link: "/guide/usage/enable-accessibility-service",
},
{
text: "后台进程保活",
link: "/guide/usage/background-process-keep-alive",
},
],
},
{
text: "贡献指南",
items: [
{
text: "核心逻辑",
link: "/guide/contributing/core-logic",
},
{
text: "配置文件",
link: "/guide/contributing/config-file",
},
{
text: "布局查看",
link: "/guide/contributing/layout-view",
},
],
},
{
text: "应用保活",
items: [
{
text: "应用保活功能",
text: "应用保活",
link: "/guide/keep-alive/intro",
},
],
},
{
text: "应用白名单",
items: [
{
text: "应用白名单功能",
text: "应用白名单",
link: "/guide/white-list/intro",
},
],
},
{
text: "设置",
items: [
{
text: "功能介绍",
text: "设置",
link: "/guide/settings/intro",
},
],
},
{
text: "关于",
items: [
{
text: "关于功能页",
text: "关于",
link: "/guide/about/intro",
},
],
},
// {
// text: "使用方法",
// items: [
// {
// text: "启用无障碍服务",
// link: "/guide/usage/enable-accessibility-service",
// },
// {
// text: "后台进程保活",
// link: "/guide/usage/background-process-keep-alive",
// },
// ],
// },
// {
// text: "贡献指南",
// items: [
// {
// text: "核心逻辑",
// link: "/guide/contributing/core-logic",
// },
// {
// text: "配置文件",
// link: "/guide/contributing/config-file",
// },
// {
// text: "布局查看",
// link: "/guide/contributing/layout-view",
// },
// ],
// },
],
"/advance/": [
{
text: "布局检查",
items: [
{
text: "功能介绍",
text: "布局检查功能",
link: "/advance/layout-inspect/intro",
},
],
Expand All @@ -120,9 +105,13 @@ export default defineConfig(
text: "自定义配置",
items: [
{
text: "功能介绍",
text: "自定义配置功能",
link: "/advance/custom-config/intro",
},
{
text: "可配置字段",
link: "/advance/custom-config/fields",
},
],
},
],
Expand Down
84 changes: 84 additions & 0 deletions docs/advance/custom-config/fields.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# 可配置字段

::: details 配置文件数据结构定义
<<< @/../app/src/main/java/com/android/skip/dataclass/ConfigReadSchema.kt
:::

## packageName `必填`

### skipTexts `可选`

#### text `必填`

根据节点的`text`属性跳过指定的文本。

#### length `可选`

判断节点的`text`属性的长度是否小于等于`length`的值。

#### activityName `可选`

判断当前页面的`activityName`是否等于`activityName`的值。相等时才会执行。

#### click `可选`

点击的坐标,格式为`x,y`

默认情况下,会点击找到节点的中心点。可以通过`click`属性可额外指定点击的坐标,而不点击所找到节点的中心点。

#### 参考

```yaml
- packageName: com.android.skip
skipTexts:
- text: 布局检查
length: 4
activityName: com.android.skip.ui.inspect.InspectActivity
click: 123,456
```
### skipIds `可选`

#### id `必填`

根据节点的`viewIdResourceName`属性搜索指定的节点。

#### activityName `可选`

#### click `可选`

#### 参考

```yaml
- packageName: com.android.skip
skipIds:
- id: android:id/navigationBarBackground
activityName: com.android.skip.ui.inspect.InspectActivity
click: 123,456
```

### skipBounds `可选`

#### bound `必填`

根据节点的`boundsInScreen`属性搜索指定的节点,即:`bound(left,top,right,bottom)`。

#### activityName `可选`

#### click `可选`

#### 参考

```yaml
- packageName: com.android.skip
skipBounds:
- bound: 53,639,1387,849
activityName: com.android.skip.ui.inspect.InspectActivity
click: 123,456
```

## 完整配置参考

::: details 默认配置文件
<<< @/../app/src/main/assets/skip_config_v3.yaml
:::
6 changes: 3 additions & 3 deletions docs/advance/custom-config/intro.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 自定义配置功能介绍

::: details 配置文件数据结构定义
<<< @/../app/src/main/java/com/android/skip/dataclass/ConfigReadSchema.kt
:::
由于应用市场的软件繁多,各种手机的型号也不一样,因此没有一种配置能够适应所有的情况。

你可以根据自己的需求,通过布局检查获取屏幕的节点信息,再通过自定义配置功能,维护好自己的配置文件。
14 changes: 13 additions & 1 deletion docs/advance/layout-inspect/intro.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# 布局检查功能介绍

![🚧](/images/under-construction.png)
布局检查功能可以用于探查屏幕的节点布局信息。

掌握屏幕的节点信息,有助于编写自定义配置文件。

## 使用方法

该功能需要通知权限。

首先要开启「SKIP 无障碍服务」,然后打开「是否启用布局检查」布局检查功能的开关即可。

通过按下音量下键,可以执行一次布局检查。

在布局检查记录中,可以查看布局检查的截图,并可以分享到其他应用转存,再通过 [布局检查工具](/inspect/index) 导入并查看详细的节点信息。
35 changes: 34 additions & 1 deletion docs/guide/settings/intro.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
# 设置功能介绍

![🚧](/images/under-construction.png)
## 自动更新

开启「自动更新」后,应用会在后台每隔 12 小时左右检查:

- 「应用版本号」是否有新版本,如果有,在「关于」页面会显示提示。
- 「配置版本号」是否有新版本,如果有,会主动更新当前的配置文件。

## 后台任务隐藏

开启「后台任务隐藏」后,在后台任务窗口中,「SKIP」应用窗口会被隐藏。

## 是否允许提示

该功能需要开启「允许通知」。

开启「是否允许提示」后,当成功执行「点击」操作时,会显示提示「已为您跳过广告」。

## 是否使用严格模式

如果开启「严格模式」,「SKIP」会完全遵循配置文件中定义的规则,因此,如果配置文件中没有定义规则的应用,就不会执行「点击」操作。

如果关闭「严格模式」,「SKIP」会默认搜索界面中的「跳过」关键字,如果找到,就会执行「点击」操作。因此,即使没有在配置文件中定义规则的应用,也可以实现「跳过广告」的功能。但同时,也会存在误触发的情况出现。

## 自定义配置

点击「自定义配置」,可以输入自定义配置规则。

支持输入纯文本的 YAML 格式或 JSON 格式,或可以返回 JSON 或 YAML 文本的 URL 链接。

配置规则参考:[自定义配置](/advance/custom-config/intro)

## 切换主题

点击「切换主题」,可以选择「浅色主题」、「深色主题」、「跟随系统」。
Binary file modified docs/public/images/getting-started-step-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/public/images/getting-started-step-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/public/images/getting-started-step-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/public/images/getting-started-step-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/public/images/getting-started-step-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/images/images.7z
Binary file not shown.
Binary file modified docs/public/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/public/images/main-interface-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/public/images/under-construction.png
Binary file not shown.

0 comments on commit e510bd1

Please sign in to comment.