Skip to content

Commit

Permalink
feat: 更新规则
Browse files Browse the repository at this point in the history
  • Loading branch information
MengNianxiaoyao committed Jun 17, 2024
1 parent a707b64 commit ec12a4c
Show file tree
Hide file tree
Showing 11 changed files with 237 additions and 64 deletions.
52 changes: 46 additions & 6 deletions src/apps/cn.xiaochuankeji.tieba.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,43 @@ export default defineGkdApp({
id: 'cn.xiaochuankeji.tieba',
name: '最右',
groups: [
{
key: -1,
name: '开屏广告',
quickFind: true,
matchTime: 10000,
actionMaximum: 1,
resetMatch: 'app',
actionMaximumKey: 0,
rules: [
{
key: 0,
matches: '[text*="跳过"][text.length<10][visibleToUser=true]',
snapshotUrls: [
'https://i.gkd.li/i/15858014',
'https://i.gkd.li/i/15858024',
],
},
{
key: 1,
matches:
'FrameLayout > FrameLayout[childCount>2] > @View[clickable=true][visibleToUser=true] + TextView[text=null] <<n [id="android:id/content"]',
snapshotUrls: 'https://i.gkd.li/i/15858023',
},
{
key: 2,
position: {
left: 'width * 0.8903',
top: 'width * 0.1342',
},
matches: '[vid="contentView"][visibleToUser=true]',
snapshotUrls: [
'https://i.gkd.li/i/15856190',
'https://i.gkd.li/i/15858008',
],
},
],
},
{
key: 1,
name: '更新提示',
Expand All @@ -14,17 +51,20 @@ export default defineGkdApp({
{
matches:
'[id="cn.xiaochuankeji.tieba:id/btn_ok"][text^="马上升级"] + [id="cn.xiaochuankeji.tieba:id/btn_cancel"][text="取消"]',
snapshotUrls: ['https://i.gkd.li/i/12660882'],
snapshotUrls: 'https://i.gkd.li/i/12660882',
},
],
},
{
key: 2,
name: '青少年模式',
matchTime: 10000,
actionMaximum: 1,
resetMatch: 'app',
rules: [
{
matches: '[text$="青少年模式"] + [text$="知道了"]',
snapshotUrls: ['https://i.gkd.li/i/12660929'],
snapshotUrls: 'https://i.gkd.li/i/12660929',
},
],
},
Expand All @@ -38,14 +78,14 @@ export default defineGkdApp({
key: 1,
matches:
'[id="cn.xiaochuankeji.tieba:id/hh_hermes_ad_tag"] + [id="cn.xiaochuankeji.tieba:id/iv_close"][clickable=true]',
snapshotUrls: ['https://i.gkd.li/i/12661011'],
snapshotUrls: 'https://i.gkd.li/i/12661011',
},
{
preKeys: [1],
key: 2,
matches:
'[id="cn.xiaochuankeji.tieba:id/iv_dislike_reason"] + LinearLayout > [text="不感兴趣"]',
snapshotUrls: ['https://i.gkd.li/i/12661028'],
snapshotUrls: 'https://i.gkd.li/i/12661028',
},
],
},
Expand All @@ -60,12 +100,12 @@ export default defineGkdApp({
{
matches:
'[id="cn.xiaochuankeji.tieba:id/confirm"][text="打开通知"] + [id="cn.xiaochuankeji.tieba:id/cancel"][text="暂不开启"]',
snapshotUrls: ['https://i.gkd.li/i/12660823'],
snapshotUrls: 'https://i.gkd.li/i/12660823',
},
{
matches:
'[text^="开启通知"] +(2) [id="cn.xiaochuankeji.tieba:id/tips_close"]',
snapshotUrls: ['https://i.gkd.li/i/12660851'],
snapshotUrls: 'https://i.gkd.li/i/12660851',
},
],
},
Expand Down
16 changes: 0 additions & 16 deletions src/apps/com.baidu.BaiduMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,21 +126,5 @@ export default defineGkdApp({
},
],
},
{
key: 10,
name: '开屏广告',
quickFind: true,
matchTime: 10000,
actionMaximum: 2,
resetMatch: 'app',
rules: [
{
key: 0,
action: 'clickCenter',
matches: '[name="android.widget.TextView"][text*="跳过"]',
snapshotUrls: 'https://i.gkd.li/i/15801034',
},
],
},
],
});
21 changes: 21 additions & 0 deletions src/apps/com.hichip.campro.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { defineGkdApp } from '@gkd-kit/define';

export default defineGkdApp({
id: 'com.hichip.campro',
name: 'CamHipro',
groups: [
{
key: 1,
name: '局部广告-卡片广告',
desc: '点击关闭',
rules: [
{
quickFind: true,
activityIds: 'main.MainActivity',
matches: '[vid="iv_close_ad"]',
snapshotUrls: 'https://i.gkd.li/i/15847732',
},
],
},
],
});
28 changes: 28 additions & 0 deletions src/apps/com.hihonor.cloudmusic.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { defineGkdApp } from '@gkd-kit/define';

export default defineGkdApp({
id: 'com.hihonor.cloudmusic',
name: '荣耀音乐',
groups: [
{
key: 1,
name: '分段广告-推荐页卡片广告',
desc: '点击[关闭]-点击[直接关闭]',
quickFind: true,
activityIds: 'com.netease.cloudmusic.activity.MainActivity',
rules: [
{
key: 0,
matches: '[vid="tag_ad_banner"]',
snapshotUrls: 'https://i.gkd.li/i/15835795',
},
{
preKeys: [0],
key: 1,
matches: '[text="直接关闭"]',
snapshotUrls: 'https://i.gkd.li/i/15835857',
},
],
},
],
});
57 changes: 30 additions & 27 deletions src/apps/com.huawei.android.totemweather.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,49 +26,52 @@ export default defineGkdApp({
name: '局部广告-卡片广告',
quickFind: true,
rules: [
{
key: 0,
activityIds:
'com.huawei.android.totemweather.composite.MarketCompositeActivity',
matches:
'[id="com.huawei.android.totemweather:id/promote_ad_cancel"]',
snapshotUrls: 'https://i.gkd.li/i/13218197',
},
{
preKeys: 0,
key: 1,
activityIds: 'com.huawei.openalliance.ad.activity.FeedbackActivity',
matches:
'[id="com.huawei.android.totemweather:id/feedback_negative_flv"] > [text="直接关闭"]',
snapshotUrls: 'https://i.gkd.li/i/13259434',
},
{
key: 2,
activityIds: 'com.huawei.android.totemweather.WeatherMainActivity',
activityIds: [
'com.huawei.android.totemweather.WeatherMainActivity',
'com.huawei.android.totemweather.WeatherHome',
],
matches:
'[id="com.huawei.android.totemweather:id/ad_cancel"][visibleToUser=true]',
snapshotUrls: 'https://i.gkd.li/i/13521221',
},
{
key: 3,
activityIds: 'com.huawei.android.totemweather.WeatherHome',
matches: '[id="com.huawei.android.totemweather:id/ad_cancel"]',
snapshotUrls: 'https://i.gkd.li/i/13787501',
snapshotUrls: [
'https://i.gkd.li/i/13521221',
'https://i.gkd.li/i/13787501',
],
},
],
},
{
key: 2,
name: '局部广告-顶部卡片广告',
name: '分段广告-卡片广告',
quickFind: true,
rules: [
{
key: 0,
quickFind: true,
activityIds: 'com.huawei.android.totemweather.WeatherMainActivity',
matches: '@ImageView[visibleToUser=true] < [vid="rl_close_pps"]',
matches: '[vid="rl_close_pps"][visibleToUser=true]',
snapshotUrls: [
'https://i.gkd.li/i/13800100',
'https://i.gkd.li/i/14278462', // 使用visibleToUser=true防止在此页面误触
'https://i.gkd.li/i/15831584',
],
},
{
key: 1,
activityIds:
'com.huawei.android.totemweather.composite.MarketCompositeActivity',
matches:
'[id="com.huawei.android.totemweather:id/promote_ad_cancel"]',
snapshotUrls: 'https://i.gkd.li/i/13218197',
},
{
preKeys: [0, 1],
key: 99,
activityIds: 'com.huawei.openalliance.ad.activity.FeedbackActivity',
matches: '[text="直接关闭"]',
snapshotUrls: [
'https://i.gkd.li/i/13259434',
'https://i.gkd.li/i/15831539',
],
},
],
Expand Down
19 changes: 19 additions & 0 deletions src/apps/com.miui.gallery.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { defineGkdApp } from '@gkd-kit/define';

export default defineGkdApp({
id: 'com.miui.gallery',
name: '相册',
groups: [
{
key: 1,
name: '功能类-删除时勾选[同时从云端删除]',
rules: [
{
activityIds: 'com.miui.gallery.activity.InternalPhotoPageActivity',
matches: '[text="同时从云端删除"][checked=false]',
snapshotUrls: 'https://i.gkd.li/i/15804289',
},
],
},
],
});
14 changes: 14 additions & 0 deletions src/apps/com.qidian.QDReader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,5 +177,19 @@ export default defineGkdApp({
},
snapshotUrls: [],
},
{
key: 18,
name: '功能类-移动网络下自动点击播放视频',
rules: [
{
quickFind: true,
activityIds: 'com.qidian.QDReader.ui.activity.QDBrowserActivity',
matches: '[text^="当前处于移动网络"]',
exampleUrls:
'https://m.gkd.li/57941037/ea612e44-12a9-405f-aa03-60a19cebef57',
snapshotUrls: 'https://i.gkd.li/i/15857381',
},
],
},
],
});
7 changes: 7 additions & 0 deletions src/apps/com.xunmeng.pinduoduo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ export default defineGkdApp({
'https://i.gkd.li/i/15211473',
],
},
{
key: 6,
activityIds: 'com.xunmeng.pinduoduo.activity.NewPageActivity',
matches:
'[text="百亿补贴"] > View[childCount=2] > Image[childCount=0][text=" "]',
snapshotUrls: 'https://i.gkd.li/i/15846032',
},
],
},
{
Expand Down
24 changes: 24 additions & 0 deletions src/apps/com.yfoo.listen.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { defineGkdApp } from '@gkd-kit/define';

export default defineGkdApp({
id: 'com.yfoo.listen',
name: '聆听音乐',
groups: [
{
key: 1,
name: '全屏广告-弹窗广告',
matchTime: 10000,
actionMaximum: 1,
resetMatch: 'app',
rules: [
{
key: 0,
quickFind: true,
activityIds: 'com.yfoo.listenx.activity.HomeActivity',
matches: '@[text="取消"] < * > [text="下载"]',
snapshotUrls: 'https://i.gkd.li/i/15856014',
},
],
},
],
});
Loading

0 comments on commit ec12a4c

Please sign in to comment.