Skip to content

Commit

Permalink
feat: 规则维护更新 (#149)
Browse files Browse the repository at this point in the history
* feat(大学搜题酱): 信息流广告

* fix(QQ): 消息页面顶部广告

* fix(京东): 广告弹窗

* feat(知乎): 自动展开回答
  • Loading branch information
aoguai committed Jun 3, 2024
1 parent c8b1ab4 commit f1ead15
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
11 changes: 6 additions & 5 deletions src/apps/com.jingdong.app.mall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,10 @@ export default defineGkdApp({
key: 5,
name: '全屏广告-广告弹窗',
enable: false,
activityIds: [
'com.jingdong.app.mall.MainFrameActivity',
'com.jd.lib.cashier.complete.view.CashierCompleteActivity',
'com.jd.lib.jshop.jshop.JshopMainShopActivity',
],
rules: [
{
key: 0,
activityIds: 'com.jingdong.app.mall.MainFrameActivity',
matches: '@FrameLayout[clickable=true] > [desc="关闭"]',
snapshotUrls: [
'https://i.gkd.li/i/13165721',
Expand All @@ -103,6 +99,10 @@ export default defineGkdApp({
},
{
key: 1,
activityIds: [
'com.jd.lib.cashier.complete.view.CashierCompleteActivity',
'com.jd.lib.jshop.jshop.JshopMainShopActivity',
],
quickFind: true,
matches: '[vid="close"][desc="关闭页面"]',
snapshotUrls: [
Expand All @@ -112,6 +112,7 @@ export default defineGkdApp({
},
{
key: 2,
activityIds: 'com.jingdong.app.mall.MainFrameActivity',
matches:
'[id="android:id/content"] > RelativeLayout > RelativeLayout > *[childCount=2] > ImageView[index=1][clickable=true]',
snapshotUrls: [
Expand Down
7 changes: 5 additions & 2 deletions src/apps/com.tencent.mobileqq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ export default defineGkdApp({
key: 0,
name: '顶部横幅',
matches:
'ImageView <n * >n TextView[text.length>0] <<n * > [name$="ImageView"||name$="Button"][desc="关闭"||(desc=null&&text=null)][childCount=0][visibleToUser=true][clickable=true][longClickable!=true][left>0&&top>0]',
excludeMatches: '[vid="chat_item_head_icon"]', // 聊天界面头像
'ImageView[clickable=false] <n * >n TextView[clickable=false][text.length>0] <<n * > [name$="ImageView"||name$="Button"][desc="关闭"||(desc=null&&text=null)][childCount=0][visibleToUser=true][clickable=true][longClickable!=true][left>0&&top>0]',
excludeMatches: [
'[vid="chat_item_head_icon"]', // 聊天界面头像
'[id^="com.tencent.mobileqq.qzone"]', // QQ空间
],
snapshotUrls: [
'https://i.gkd.li/import/13426912',
'https://i.gkd.li/import/12706907',
Expand Down
5 changes: 2 additions & 3 deletions src/apps/com.zhihu.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,13 @@ export default defineGkdApp({
name: '功能类-自动展开回答',
desc: '自动点击展开',
enable: false,
quickFind: true,
rules: [
{
activityIds:
'com.zhihu.android.mixshortcontainer.MixShortContainerActivity',
matches:
'ImageView[id="com.zhihu.android:id/iv_expand"] - TextView[id="com.zhihu.android:id/tv_expand"][text="展开"][visibleToUser=true]',
exampleUrls:
'https://m.gkd.li/57941037/6f6e5fd0-98a8-4a92-be02-7f34e3c5b8bd',
'ImageView[id="com.zhihu.android:id/iv_expand"] - TextView[text="展开"][visibleToUser=true]',
snapshotUrls: [
'https://i.gkd.li/import/12647688',
'https://i.gkd.li/import/12707687', // 使用 [visibleToUser=true] 进行限定,防止在控件不可见时提前触发规则
Expand Down
5 changes: 5 additions & 0 deletions src/apps/com.zmzx.college.search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ export default defineGkdApp({
matches: '[text="广告"] <<n View +n View > Image[text.length=0]',
snapshotUrls: 'https://i.gkd.li/i/15521151',
},
{
key: 2,
matches: '[vid="iv_native_close"]',
snapshotUrls: 'https://i.gkd.li/i/15527866',
},
],
},
{
Expand Down

0 comments on commit f1ead15

Please sign in to comment.