chore: pnpm lint

This commit is contained in:
lisonge 2023-09-04 17:08:56 +08:00
parent c18b6a8c9c
commit c78510c465
77 changed files with 271 additions and 248 deletions

View File

@ -18,5 +18,6 @@ module.exports = defineConfig({
'@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-explicit-any': 'off',
'no-empty': 'off', 'no-empty': 'off',
'prefer-const': 'off', 'prefer-const': 'off',
quotes: ['error', 'single', { allowTemplateLiterals: false }],
}, },
}); });

View File

@ -1,4 +1,4 @@
import subsConfig from '../src/config'; import subsConfig from '../src/config';
import { writeConfig } from '../src/file'; import { writeConfig } from '../src/file';
await writeConfig(process.cwd() + `/dist/gkd.json`, subsConfig); await writeConfig(process.cwd() + '/dist/gkd.json', subsConfig);

View File

@ -4,4 +4,4 @@ import picocolors from 'picocolors';
checkConfig(subsConfig); checkConfig(subsConfig);
console.log(picocolors.green(`校验成功, 合法订阅`)); console.log(picocolors.green('校验成功, 合法订阅'));

View File

@ -2,34 +2,37 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'air.tv.douyu.android', id: 'air.tv.douyu.android',
name: `斗鱼`, name: '斗鱼',
groups: [ groups: [
{ {
key: 0, key: 0,
name: '开屏广告', name: '开屏广告',
activityIds: [ activityIds: [
'com.douyu.module.home.pages.main.MainActivity', 'com.douyu.module.home.pages.main.MainActivity',
`com.douyu.module.ad.launch.HotStartSplashActivity`, 'com.douyu.module.ad.launch.HotStartSplashActivity',
], ],
rules: [ rules: [
{ {
matches: `@TextView[text^='跳过'] + LinearLayout TextView[text*="跳转"]`, matches:
snapshotUrls: `https://gkd-kit.gitee.io/import/38517192/50c858ee-d331-4d5a-b5db-5eb17323c5ff`, '@TextView[text^=\'跳过\'] + LinearLayout TextView[text*="跳转"]',
snapshotUrls:
'https://gkd-kit.gitee.io/import/38517192/50c858ee-d331-4d5a-b5db-5eb17323c5ff',
}, },
`[text^='跳过'] + * >2 TextView[text*='跳转']`, // 1686970245243, 1686970188866 '[text^=\'跳过\'] + * >2 TextView[text*=\'跳转\']', // 1686970245243, 1686970188866
], ],
}, },
{ {
key: 1, key: 1,
name: `青少年模式`, name: '青少年模式',
desc: `关闭青少年模式提醒弹窗`, desc: '关闭青少年模式提醒弹窗',
activityIds: [ activityIds: [
`com.douyu.module.young.view.YoungModeGuideDialog`, 'com.douyu.module.young.view.YoungModeGuideDialog',
`com.douyu.module.home.pages.main.MainActivity`, 'com.douyu.module.home.pages.main.MainActivity',
], ],
snapshotUrls: `https://gkd-kit.gitee.io/import/38517192/1c081a65-688a-406b-b67b-9bfb9aba0fad`, snapshotUrls:
'https://gkd-kit.gitee.io/import/38517192/1c081a65-688a-406b-b67b-9bfb9aba0fad',
rules: [ rules: [
`[text='开启青少年模式'] + [text='我知道了']`, // 1686970236642 '[text=\'开启青少年模式\'] + [text=\'我知道了\']', // 1686970236642
], ],
}, },
{ {

View File

@ -2,14 +2,15 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'cn.damai', id: 'cn.damai',
name: `大麦`, name: '大麦',
groups: [ groups: [
{ {
key: 0, key: 0,
name: `开屏广告`, name: '开屏广告',
activityIds: `cn.damai.launcher.splash.SplashMainActivity`, activityIds: 'cn.damai.launcher.splash.SplashMainActivity',
rules: `[id="cn.damai:id/homepage_advert_pb"]`, rules: '[id="cn.damai:id/homepage_advert_pb"]',
snapshotUrls: `https://gkd-kit.gitee.io/import/38517192/38859663-6f0c-48b1-9392-20ae937a8c9e`, snapshotUrls:
'https://gkd-kit.gitee.io/import/38517192/38859663-6f0c-48b1-9392-20ae937a8c9e',
}, },
], ],
}); });

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.MobileTicket', id: 'com.MobileTicket',
name: `铁路12306`, name: '铁路12306',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,13 +2,13 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.UCMobile', id: 'com.UCMobile',
name: `UC浏览器`, name: 'UC浏览器',
groups: [ groups: [
{ {
key: -1, key: -1,
name: `开屏广告`, name: '开屏广告',
desc: `空规则组-待实现`, desc: '空规则组-待实现',
activityIds: `com.uc.browser.InnerUCMobile`, activityIds: 'com.uc.browser.InnerUCMobile',
// TODO // TODO
}, },
{ {

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.achievo.vipshop', id: 'com.achievo.vipshop',
name: `唯品会`, name: '唯品会',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.alibaba.wireless', id: 'com.alibaba.wireless',
name: `阿里巴巴`, name: '阿里巴巴',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,14 +2,15 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.android.bankabc', id: 'com.android.bankabc',
name: `中国农业银行`, name: '中国农业银行',
groups: [ groups: [
{ {
key: 0, key: 0,
name: `开屏广告`, name: '开屏广告',
activityIds: `com.alipay.mobile.quinox.LauncherActivity`, activityIds: 'com.alipay.mobile.quinox.LauncherActivity',
rules: [`ImageView[id="com.android.bankabc:id/close"]`], rules: ['ImageView[id="com.android.bankabc:id/close"]'],
snapshotUrls: `https://gkd-kit.gitee.io/import/38517192/3653218a-e0e0-4a60-8308-dea5fd4179b3`, snapshotUrls:
'https://gkd-kit.gitee.io/import/38517192/3653218a-e0e0-4a60-8308-dea5fd4179b3',
}, },
], ],
}); });

View File

@ -2,12 +2,12 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.android.thememanager', id: 'com.android.thememanager',
name: `miui主题壁纸`, name: 'miui主题壁纸',
groups: [ groups: [
{ {
key: 1, key: 1,
name: '推荐下广告', name: '推荐下广告',
desc: `注意如果使用ADB禁用了MIUI广告组件,点击此按钮会无反应,可关闭此规则,避免过多相同点击记录`, desc: '注意如果使用ADB禁用了MIUI广告组件,点击此按钮会无反应,可关闭此规则,避免过多相同点击记录',
rules: '[id=`com.android.thememanager:id/ad_close_btn`]', rules: '[id=`com.android.thememanager:id/ad_close_btn`]',
}, },
], ],

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.anjuke.android.app', id: 'com.anjuke.android.app',
name: `安居客`, name: '安居客',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.baidu.BaiduMap', id: 'com.baidu.BaiduMap',
name: `百度地图`, name: '百度地图',
groups: [ groups: [
{ {
key: 0, key: 0,
@ -10,7 +10,7 @@ export default defineAppConfig({
activityIds: 'com.baidu.baidumaps.MapsActivity', activityIds: 'com.baidu.baidumaps.MapsActivity',
rules: [ rules: [
'@TextView[text^=`跳过`] + TextView[text=`广告`]', '@TextView[text^=`跳过`] + TextView[text=`广告`]',
`ImageView[clickable=false] + TextView[text^='跳过'][clickable=true]`, // 1689423368140 'ImageView[clickable=false] + TextView[text^=\'跳过\'][clickable=true]', // 1689423368140
], ],
}, },
], ],

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.baidu.homework', id: 'com.baidu.homework',
name: `作业帮`, name: '作业帮',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.baidu.netdisk', id: 'com.baidu.netdisk',
name: `百度网盘`, name: '百度网盘',
groups: [ groups: [
{ {
key: 0, key: 0,
@ -10,11 +10,12 @@ export default defineAppConfig({
activityIds: 'com.baidu.netdisk.ui.Navigate', activityIds: 'com.baidu.netdisk.ui.Navigate',
rules: [ rules: [
{ {
matches: `TextView[text="跳过"][clickable=true]`, matches: 'TextView[text="跳过"][clickable=true]',
snapshotUrls: `https://gkd-kit.gitee.io/import/38517192/edc1d0a6-ebdd-48b0-9e11-f0b2c277c40a`, snapshotUrls:
'https://gkd-kit.gitee.io/import/38517192/edc1d0a6-ebdd-48b0-9e11-f0b2c277c40a',
}, },
'@TextView[text^=`跳过`] + TextView[text=`广告`]', '@TextView[text^=`跳过`] + TextView[text=`广告`]',
`[id='com.byted.pangle:id/tt_splash_skip_btn']`, // 1687136781353 '[id=\'com.byted.pangle:id/tt_splash_skip_btn\']', // 1687136781353
], ],
}, },
], ],

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.baidu.tieba', id: 'com.baidu.tieba',
name: `百度贴吧`, name: '百度贴吧',
groups: [ groups: [
{ {
key: 0, key: 0,
@ -64,18 +64,18 @@ export default defineAppConfig({
}, },
{ {
key: 6, key: 6,
name: `首页左侧游戏广告小图标`, name: '首页左侧游戏广告小图标',
activityIds: `com.baidu.tieba.tblauncher.MainTabActivity`, activityIds: 'com.baidu.tieba.tblauncher.MainTabActivity',
rules: [ rules: [
`ImageView[clickable=true] - RelativeLayout[clickable=false][childCount=1] > ImageView[clickable=true]`, 'ImageView[clickable=true] - RelativeLayout[clickable=false][childCount=1] > ImageView[clickable=true]',
], ],
}, },
{ {
key: 7, key: 7,
name: `升级弹窗`, name: '升级弹窗',
activityIds: `com.baidu.tieba.UpdateDialog`, activityIds: 'com.baidu.tieba.UpdateDialog',
rules: `[text="稍后再说"]`, rules: '[text="稍后再说"]',
snapshotUrls: `https://gkd-kit.gitee.io/import/12496934`, snapshotUrls: 'https://gkd-kit.gitee.io/import/12496934',
}, },
], ],
}); });

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.bjsk.intelligent', id: 'com.bjsk.intelligent',
name: `WiFi智能钥匙`, name: 'WiFi智能钥匙',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.cmcc.cmvideo', id: 'com.cmcc.cmvideo',
name: `咪咕视频`, name: '咪咕视频',
groups: [ groups: [
{ {
key: 0, key: 0,
@ -12,17 +12,17 @@ export default defineAppConfig({
}, },
{ {
key: 1, key: 1,
name: `青少年模式弹窗`, name: '青少年模式弹窗',
activityIds: `com.cmcc.cmvideo.main.application.CompatibleMainActivity`, activityIds: 'com.cmcc.cmvideo.main.application.CompatibleMainActivity',
rules: `[id="com.cmcc.cmvideo:id/btn_cancle"]`, rules: '[id="com.cmcc.cmvideo:id/btn_cancle"]',
snapshotUrls: `https://gkd-kit.gitee.io/import/12498307`, snapshotUrls: 'https://gkd-kit.gitee.io/import/12498307',
}, },
{ {
key: 2, key: 2,
name: `右下角小广告`, name: '右下角小广告',
activityIds: `com.cmcc.cmvideo.main.application.CompatibleMainActivity`, activityIds: 'com.cmcc.cmvideo.main.application.CompatibleMainActivity',
rules: `[id="com.cmcc.cmvideo:id/iv_right_bottom_close"]`, rules: '[id="com.cmcc.cmvideo:id/iv_right_bottom_close"]',
snapshotUrls: `https://gkd-kit.gitee.io/import/12498315`, snapshotUrls: 'https://gkd-kit.gitee.io/import/12498315',
}, },
], ],
}); });

View File

@ -2,19 +2,19 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.coolapk.market', id: 'com.coolapk.market',
name: `酷安`, name: '酷安',
groups: [ groups: [
{ {
key: -1, key: -1,
name: `开屏广告`, name: '开屏广告',
activityIds: [ activityIds: [
`com.coolapk.market.view.splash.SplashActivity`, 'com.coolapk.market.view.splash.SplashActivity',
`com.coolapk.market.view.main.MainActivity`, 'com.coolapk.market.view.main.MainActivity',
], ],
rules: `[id$=":id/tt_splash_skip_btn"]`, rules: '[id$=":id/tt_splash_skip_btn"]',
snapshotUrls: [ snapshotUrls: [
`https://gkd-kit.gitee.io/import/38517192/4ba30986-55d4-4a94-b7e2-6cf7d9c6d66d`, 'https://gkd-kit.gitee.io/import/38517192/4ba30986-55d4-4a94-b7e2-6cf7d9c6d66d',
`https://gkd-kit.gitee.io/import/12503773`, 'https://gkd-kit.gitee.io/import/12503773',
], ],
}, },
{ {
@ -32,19 +32,20 @@ export default defineAppConfig({
'com.coolapk.market.view.main.MainActivity', 'com.coolapk.market.view.main.MainActivity',
'com.coolapk.market.view.base.SimpleAlphaActivity', 'com.coolapk.market.view.base.SimpleAlphaActivity',
], ],
snapshotUrls: `https://gkd-kit.gitee.io/import/38517192/9badc07c-4da2-4066-8af5-d96a86a28315`, snapshotUrls:
'https://gkd-kit.gitee.io/import/38517192/9badc07c-4da2-4066-8af5-d96a86a28315',
matches: '@LinearLayout > TextView[id!=null][text=`不感兴趣`]', matches: '@LinearLayout > TextView[id!=null][text=`不感兴趣`]',
}, },
`Button[text$="免广告"] + Button[text="不感兴趣"]`, // 1692148279610 'Button[text$="免广告"] + Button[text="不感兴趣"]', // 1692148279610
'Button[text$=`去广告`] - Button[text=`不感兴趣`]', 'Button[text$=`去广告`] - Button[text=`不感兴趣`]',
'[id=`com.coolapk.market:id/close_view`]', '[id=`com.coolapk.market:id/close_view`]',
], ],
}, },
{ {
key: 1, key: 1,
name: `关闭升级弹窗`, name: '关闭升级弹窗',
activityIds: `com.coolapk.market.view.main.MainActivity`, activityIds: 'com.coolapk.market.view.main.MainActivity',
snapshotUrls: `https://gkd-kit.gitee.io/import/12503762`, snapshotUrls: 'https://gkd-kit.gitee.io/import/12503762',
rules: '[text=`立即更新`] - [text=`取消`]', rules: '[text=`立即更新`] - [text=`取消`]',
}, },
], ],

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.daimajia.gold', id: 'com.daimajia.gold',
name: `稀土掘金`, name: '稀土掘金',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.dianping.v1', id: 'com.dianping.v1',
name: `大众点评`, name: '大众点评',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.dragon.read', id: 'com.dragon.read',
name: `番茄免费小说`, name: '番茄免费小说',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.duokan.phone.remotecontroller', id: 'com.duokan.phone.remotecontroller',
name: `万能遥控`, name: '万能遥控',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.duowan.kiwi', id: 'com.duowan.kiwi',
name: `虎牙直播`, name: '虎牙直播',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.google.android.youtube', id: 'com.google.android.youtube',
name: `youtube`, name: 'youtube',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.gotokeep.keep', id: 'com.gotokeep.keep',
name: `Keep`, name: 'Keep',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.greenpoint.android.mc10086.activity', id: 'com.greenpoint.android.mc10086.activity',
name: `中国移动`, name: '中国移动',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.handsgo.jiakao.android', id: 'com.handsgo.jiakao.android',
name: `驾考宝典`, name: '驾考宝典',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,20 +2,22 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.hunantv.imgo.activity', id: 'com.hunantv.imgo.activity',
name: `芒果TV`, name: '芒果TV',
groups: [ groups: [
{ {
key: -1, key: -1,
name: `开屏广告`, name: '开屏广告',
activityIds: `com.hunantv.imgo.activity.MainActivity`, activityIds: 'com.hunantv.imgo.activity.MainActivity',
rules: [ rules: [
{ {
matches: `[id="com.hunantv.imgo.activity:id/layout_boot_skip"]`, matches: '[id="com.hunantv.imgo.activity:id/layout_boot_skip"]',
snapshotUrls: `https://gkd-kit.gitee.io/import/38517192/7202bd0a-a5c6-4ec4-9547-bf4ca6d372d0`, snapshotUrls:
'https://gkd-kit.gitee.io/import/38517192/7202bd0a-a5c6-4ec4-9547-bf4ca6d372d0',
}, },
{ {
matches: `TextView[text!=null] - [text^="跳过"]`, matches: 'TextView[text!=null] - [text^="跳过"]',
snapshotUrls: `https://gkd-kit.gitee.io/import/38517192/7202bd0a-a5c6-4ec4-9547-bf4ca6d372d0`, snapshotUrls:
'https://gkd-kit.gitee.io/import/38517192/7202bd0a-a5c6-4ec4-9547-bf4ca6d372d0',
}, },
], ],
}, },
@ -30,16 +32,19 @@ export default defineAppConfig({
}, },
{ {
key: 1, key: 1,
name: `首页推荐流-卡片广告`, name: '首页推荐流-卡片广告',
activityIds: `com.hunantv.imgo.activity.MainActivity`, activityIds: 'com.hunantv.imgo.activity.MainActivity',
rules: [ rules: [
{ {
matches: '[id="com.hunantv.imgo.activity:id/close_ad"]', matches: '[id="com.hunantv.imgo.activity:id/close_ad"]',
snapshotUrls: `https://gkd-kit.gitee.io/import/38517192/40fb71ad-01a5-4420-9150-88172ff8a3bf`, snapshotUrls:
'https://gkd-kit.gitee.io/import/38517192/40fb71ad-01a5-4420-9150-88172ff8a3bf',
}, },
{ {
matches: `@[id="com.hunantv.imgo.activity:id/layout_logo"] > [id="com.hunantv.imgo.activity:id/tv_ad_logo"]`, matches:
snapshotUrls: `https://gkd-kit.gitee.io/import/38517192/b74150b5-8e9f-4cbb-86a7-722fc739a1b8`, '@[id="com.hunantv.imgo.activity:id/layout_logo"] > [id="com.hunantv.imgo.activity:id/tv_ad_logo"]',
snapshotUrls:
'https://gkd-kit.gitee.io/import/38517192/b74150b5-8e9f-4cbb-86a7-722fc739a1b8',
}, },
], ],
}, },

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.hupu.shihuo', id: 'com.hupu.shihuo',
name: `识货`, name: '识货',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.hxak.liangongbao', id: 'com.hxak.liangongbao',
name: `链工宝`, name: '链工宝',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.icbc', id: 'com.icbc',
name: `中国工商银行`, name: '中国工商银行',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.intsig.camscanner', id: 'com.intsig.camscanner',
name: `扫描全能王`, name: '扫描全能王',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.iqiyi.hotchat', id: 'com.iqiyi.hotchat',
name: `爱奇艺热聊`, name: '爱奇艺热聊',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,13 +2,13 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.jym.mall', id: 'com.jym.mall',
name: `交易猫`, name: '交易猫',
groups: [ groups: [
{ {
key: 0, key: 0,
name: `升级弹窗`, name: '升级弹窗',
rules: `[id="com.jym.mall:id/tv_cancel"][text="下次再说"]`, rules: '[id="com.jym.mall:id/tv_cancel"][text="下次再说"]',
snapshotUrls: `https://gkd-kit.gitee.io/import/12496974`, snapshotUrls: 'https://gkd-kit.gitee.io/import/12496974',
}, },
], ],
}); });

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.kmxs.reader', id: 'com.kmxs.reader',
name: `七猫免费小说`, name: '七猫免费小说',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.kuaikan.comic', id: 'com.kuaikan.comic',
name: `快看`, name: '快看',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.kugou.android', id: 'com.kugou.android',
name: `酷狗音乐`, name: '酷狗音乐',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,14 +2,16 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.kwai.videoeditor', id: 'com.kwai.videoeditor',
name: `快影`, name: '快影',
groups: [ groups: [
{ {
key: 0, key: 0,
name: `开屏广告`, name: '开屏广告',
activityIds: `com.kwai.videoeditor.activity.splash.InnerVideoSplashActivity`, activityIds:
rules: [`Button[text="跳过"]`], 'com.kwai.videoeditor.activity.splash.InnerVideoSplashActivity',
snapshotUrls: `https://gkd-kit.gitee.io/import/38517192/d12c3b08-8233-4584-b2b9-595ebb4ce665`, rules: ['Button[text="跳过"]'],
snapshotUrls:
'https://gkd-kit.gitee.io/import/38517192/d12c3b08-8233-4584-b2b9-595ebb4ce665',
}, },
], ],
}); });

View File

@ -2,17 +2,17 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.mihoyo.hyperion', id: 'com.mihoyo.hyperion',
name: `米游社`, name: '米游社',
groups: [ groups: [
{ {
key: 0, key: 0,
name: '开屏广告', name: '开屏广告',
activityIds: [ activityIds: [
'com.mihoyo.hyperion.ui.SplashActivity', 'com.mihoyo.hyperion.ui.SplashActivity',
`com.mihoyo.hyperion.splash.SplashActivity`, 'com.mihoyo.hyperion.splash.SplashActivity',
], ],
rules: '[id=`com.mihoyo.hyperion:id/mSplashBtJump`]', rules: '[id=`com.mihoyo.hyperion:id/mSplashBtJump`]',
snapshotUrls: `https://gkd-kit.gitee.io/import/12482738`, snapshotUrls: 'https://gkd-kit.gitee.io/import/12482738',
}, },
{ {
key: 1, key: 1,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.miui.player', id: 'com.miui.player',
name: `小米音乐`, name: '小米音乐',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.miui.systemAdSolution', id: 'com.miui.systemAdSolution',
name: `miui系统广告`, name: 'miui系统广告',
groups: [ groups: [
{ {
key: 0, key: 0,
@ -12,7 +12,7 @@ export default defineAppConfig({
{ {
key: 1, key: 1,
name: 'miui-为什么不希望看到这条推广', name: 'miui-为什么不希望看到这条推广',
desc: `关闭这个提示,使用ADB禁用广告组件时,点击此按钮无反应`, desc: '关闭这个提示,使用ADB禁用广告组件时,点击此按钮无反应',
activityIds: 'com.xiaomi.ad.feedback', activityIds: 'com.xiaomi.ad.feedback',
rules: '[id=`com.miui.systemAdSolution:id/no_interest`]', rules: '[id=`com.miui.systemAdSolution:id/no_interest`]',
}, },

View File

@ -2,14 +2,15 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.mt.mtxx.mtxx', id: 'com.mt.mtxx.mtxx',
name: `美图秀秀`, name: '美图秀秀',
groups: [ groups: [
{ {
key: 0, key: 0,
name: '开屏广告', name: '开屏广告',
activityIds: 'com.meitu.business.ads.core.activity.AdActivity', activityIds: 'com.meitu.business.ads.core.activity.AdActivity',
rules: '[text=`跳过广告`]', rules: '[text=`跳过广告`]',
snapshotUrls: `https://gkd-kit.gitee.io/import/38517192/1f56aa17-c290-4e56-b6fb-a94bc778448b`, snapshotUrls:
'https://gkd-kit.gitee.io/import/38517192/1f56aa17-c290-4e56-b6fb-a94bc778448b',
}, },
], ],
}); });

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.netease.cloudmusic', id: 'com.netease.cloudmusic',
name: `网易云音乐`, name: '网易云音乐',
groups: [ groups: [
{ {
key: 0, key: 0,
@ -12,19 +12,21 @@ export default defineAppConfig({
}, },
{ {
key: 1, key: 1,
name: `广告卡片`, name: '广告卡片',
rules: [ rules: [
{ {
activityIds: `com.netease.cloudmusic.module.ad.feedback.AdFeedbackBottomSheet`, activityIds:
matches: `[text="直接关闭"]`, 'com.netease.cloudmusic.module.ad.feedback.AdFeedbackBottomSheet',
matches: '[text="直接关闭"]',
snapshotUrls: [ snapshotUrls: [
`https://gkd-kit.songe.li/import/38517192/fea3449b-d642-4d75-929f-490421cc9080`, 'https://gkd-kit.songe.li/import/38517192/fea3449b-d642-4d75-929f-490421cc9080',
], ],
}, },
{ {
activityIds: `com.netease.cloudmusic.activity.MainActivity`, activityIds: 'com.netease.cloudmusic.activity.MainActivity',
matches: `[id="com.netease.cloudmusic:id/adTagClose"]`, matches: '[id="com.netease.cloudmusic:id/adTagClose"]',
snapshotUrls: `https://gkd-kit.songe.li/import/38517192/a977b19d-2b3c-43df-ba01-63e7cbbb3908`, snapshotUrls:
'https://gkd-kit.songe.li/import/38517192/a977b19d-2b3c-43df-ba01-63e7cbbb3908',
}, },
], ],
}, },

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.qidian.QDReader', id: 'com.qidian.QDReader',
name: `起点读书`, name: '起点读书',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.qiyi.video', id: 'com.qiyi.video',
name: `爱奇艺`, name: '爱奇艺',
groups: [ groups: [
{ {
key: 0, key: 0,
@ -19,11 +19,11 @@ export default defineAppConfig({
}, },
{ {
key: 2, key: 2,
name: `我的-顶部广告`, name: '我的-顶部广告',
activityIds: `org.qiyi.android.video.MainActivity`, activityIds: 'org.qiyi.android.video.MainActivity',
snapshotUrls: `https://gkd-kit.gitee.io/import/12495050`, snapshotUrls: 'https://gkd-kit.gitee.io/import/12495050',
rules: [ rules: [
`[id="com.qiyi.video:id/unused_res_a"] > [id="com.qiyi.video:id/close"]`, '[id="com.qiyi.video:id/unused_res_a"] > [id="com.qiyi.video:id/close"]',
], ],
}, },
], ],

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.quark.browser', id: 'com.quark.browser',
name: `夸克浏览器`, name: '夸克浏览器',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.sankuai.meituan.takeoutnew', id: 'com.sankuai.meituan.takeoutnew',
name: `美团外卖`, name: '美团外卖',
groups: [ groups: [
{ {
key: 0, key: 0,
@ -13,18 +13,19 @@ export default defineAppConfig({
}, },
{ {
key: 1, key: 1,
name: `关闭更新弹窗`, name: '关闭更新弹窗',
activityIds: `com.sankuai.waimai.business.page.homepage.widget.dialog.UpdateForceInstallDialog`, activityIds:
'com.sankuai.waimai.business.page.homepage.widget.dialog.UpdateForceInstallDialog',
rules: [ rules: [
`[id='com.sankuai.meituan.takeoutnew:id/wm_upgrade_force_cancel']`, // 1686969252896 '[id=\'com.sankuai.meituan.takeoutnew:id/wm_upgrade_force_cancel\']', // 1686969252896
], ],
}, },
{ {
key: 2, key: 2,
name: `关闭美食广告弹窗`, name: '关闭美食广告弹窗',
activityIds: `com.sankuai.waimai.platform.mach.dialog.DynamicDialog`, activityIds: 'com.sankuai.waimai.platform.mach.dialog.DynamicDialog',
rules: [ rules: [
`@[desc='关闭'][clickable=true] > ImageView`, // 1686969062508 '@[desc=\'关闭\'][clickable=true] > ImageView', // 1686969062508
], ],
}, },
], ],

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.sankuai.meituan', id: 'com.sankuai.meituan',
name: `美团`, name: '美团',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.sdu.didi.psnger', id: 'com.sdu.didi.psnger',
name: `滴滴`, name: '滴滴',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.sina.weibo', id: 'com.sina.weibo',
name: `微博`, name: '微博',
groups: [ groups: [
{ {
key: 0, key: 0,
@ -18,10 +18,10 @@ export default defineAppConfig({
}, },
{ {
key: 2, key: 2,
name: `关闭不感兴趣广告弹窗`, name: '关闭不感兴趣广告弹窗',
activityIds: `com.sina.weibo.view.bottomsheet.dialog.`, activityIds: 'com.sina.weibo.view.bottomsheet.dialog.',
rules: { rules: {
matches: [`[text="为何会看到此广告"]`, `[text="不感兴趣"]`], matches: ['[text="为何会看到此广告"]', '[text="不感兴趣"]'],
}, // 1688889362832 }, // 1688889362832
}, },
], ],

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.smile.gifmaker', id: 'com.smile.gifmaker',
name: `快手`, name: '快手',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,15 +2,16 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.snda.wifilocating', id: 'com.snda.wifilocating',
name: `WiFi万能钥匙`, name: 'WiFi万能钥匙',
groups: [ groups: [
{ {
key: -1, key: -1,
name: `开屏广告`, name: '开屏广告',
activityIds: `com.lantern.launcher.ui.MainActivity`, activityIds: 'com.lantern.launcher.ui.MainActivity',
snapshotUrls: `https://gkd-kit.gitee.io/import/38517192/4d6fdd1e-28ec-4b61-86e2-641b7b5b8899`, snapshotUrls:
'https://gkd-kit.gitee.io/import/38517192/4d6fdd1e-28ec-4b61-86e2-641b7b5b8899',
rules: [ rules: [
`TextView[text="广告"] -3 RelativeLayout > TextView[text*="跳过"]`, 'TextView[text="广告"] -3 RelativeLayout > TextView[text*="跳过"]',
], ],
}, },
{ {

View File

@ -2,16 +2,16 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.ss.android.article.video', id: 'com.ss.android.article.video',
name: `西瓜视频`, name: '西瓜视频',
groups: [ groups: [
{ {
key: 0, key: 0,
name: `西瓜视频-关闭青少年模式弹窗`, name: '西瓜视频-关闭青少年模式弹窗',
activityIds: `com.ixigua.commonui.uikit.dialog.XGAlertDialog`, activityIds: 'com.ixigua.commonui.uikit.dialog.XGAlertDialog',
snapshotUrls: [ snapshotUrls: [
`https://gkd-kit.gitee.io/import/38517192/78f0c1f6-e8da-4bc4-acd3-5e6dc056b044`, 'https://gkd-kit.gitee.io/import/38517192/78f0c1f6-e8da-4bc4-acd3-5e6dc056b044',
], ],
rules: [`TextView[text="我知道了"][clickable=true]`], rules: ['TextView[text="我知道了"][clickable=true]'],
}, },
], ],
}); });

View File

@ -2,11 +2,11 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.ss.android.ugc.aweme', id: 'com.ss.android.ugc.aweme',
name: `抖音`, name: '抖音',
groups: [ groups: [
{ {
key: 0, key: 0,
name: `关闭青少年弹窗`, name: '关闭青少年弹窗',
rules: 'Button[text=`开启青少年模式`] + * > Button[text!=null]', rules: 'Button[text=`开启青少年模式`] + * > Button[text!=null]',
}, },
], ],

View File

@ -1,14 +1,14 @@
import { defineAppConfig } from '../types'; import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: `com.taobao.taobao`, id: 'com.taobao.taobao',
name: `淘宝`, name: '淘宝',
groups: [ groups: [
{ {
key: 0, key: 0,
name: `开屏广告`, name: '开屏广告',
activityIds: `com.taobao.bootimage.activity.BootImageActivity`, activityIds: 'com.taobao.bootimage.activity.BootImageActivity',
rules: `[id='com.taobao.taobao:id/close']`, // 1687596777612 rules: '[id=\'com.taobao.taobao:id/close\']', // 1687596777612
}, },
], ],
}); });

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.tencent.androidqqmail', id: 'com.tencent.androidqqmail',
name: `qq邮箱`, name: 'qq邮箱',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.tencent.djcity', id: 'com.tencent.djcity',
name: `掌上道聚城`, name: '掌上道聚城',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.tencent.karaoke', id: 'com.tencent.karaoke',
name: `全民K歌`, name: '全民K歌',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.tencent.mobileqq', id: 'com.tencent.mobileqq',
name: `QQ`, name: 'QQ',
groups: [ groups: [
{ {
key: 0, key: 0,
@ -12,23 +12,26 @@ export default defineAppConfig({
}, },
{ {
key: 1, key: 1,
name: `消息页面-顶部广告`, name: '消息页面-顶部广告',
activityIds: `com.tencent.mobileqq.activity.SplashActivity`, activityIds: 'com.tencent.mobileqq.activity.SplashActivity',
rules: [ rules: [
`ImageView[id!=null][desc='关闭'][clickable=true]`, // 1687669217838 'ImageView[id!=null][desc=\'关闭\'][clickable=true]', // 1687669217838
], ],
}, },
{ {
key: 2, key: 2,
name: `好友动态-广告卡片`, name: '好友动态-广告卡片',
rules: [ rules: [
{ {
activityIds: `com.tencent.qqlive.module.videoreport.inject.dialog.ReportDialog`, activityIds:
matches: `[clickable=true] > ImageView + TextView[text="关闭此条广告"]`, // 1689050230463 'com.tencent.qqlive.module.videoreport.inject.dialog.ReportDialog',
matches:
'[clickable=true] > ImageView + TextView[text="关闭此条广告"]', // 1689050230463
}, },
{ {
activityIds: `com.qzone.reborn.feedx.activity.QZoneFriendFeedXActivity`, activityIds:
matches: `View[desc="广告"] + ImageView[clickable=true]`, // 1689050226722 'com.qzone.reborn.feedx.activity.QZoneFriendFeedXActivity',
matches: 'View[desc="广告"] + ImageView[clickable=true]', // 1689050226722
}, },
], ],
}, },

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.tencent.mtt', id: 'com.tencent.mtt',
name: `QQ浏览器`, name: 'QQ浏览器',
groups: [ groups: [
{ {
key: 0, key: 0,
@ -12,9 +12,9 @@ export default defineAppConfig({
'@View[id=null] + ImageView + FrameLayout TextView[text=`向上滑动或点击查看`]', '@View[id=null] + ImageView + FrameLayout TextView[text=`向上滑动或点击查看`]',
{ {
matches: `@LinearLayout[clickable=true] > TextView[text="跳过"]`, matches: '@LinearLayout[clickable=true] > TextView[text="跳过"]',
snapshotUrls: [ snapshotUrls: [
`https://gkd-kit.gitee.io/import/38517192/7d8e9661-c29a-4448-94c2-d7b0a1756107`, 'https://gkd-kit.gitee.io/import/38517192/7d8e9661-c29a-4448-94c2-d7b0a1756107',
], ],
}, },
], ],

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.tencent.qqlive', id: 'com.tencent.qqlive',
name: `腾讯视频`, name: '腾讯视频',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.tencent.qqmusic', id: 'com.tencent.qqmusic',
name: `QQ音乐`, name: 'QQ音乐',
groups: [ groups: [
{ {
key: 0, key: 0,
@ -18,8 +18,8 @@ export default defineAppConfig({
name: '推荐页-广告卡片', name: '推荐页-广告卡片',
activityIds: 'com.tencent.qqmusic.activity.AppStarterActivity', activityIds: 'com.tencent.qqmusic.activity.AppStarterActivity',
rules: [ rules: [
`@LinearLayout[clickable=true] > TextView[text='广告'] + ImageView`, // 1688045698846 '@LinearLayout[clickable=true] > TextView[text=\'广告\'] + ImageView', // 1688045698846
`TextView[text="广告 | 关闭"][clickable=true]`, 'TextView[text="广告 | 关闭"][clickable=true]',
], ],
}, },
], ],

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.tencent.qt.sns', id: 'com.tencent.qt.sns',
name: `掌上穿越火线`, name: '掌上穿越火线',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,13 +2,13 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.xiaomi.market', id: 'com.xiaomi.market',
name: `小米应用商店`, name: '小米应用商店',
groups: [ groups: [
{ {
key: 0, key: 0,
name: '首页悬浮窗广告', name: '首页悬浮窗广告',
activityIds: 'com.xiaomi.market.ui.FloatWebActivity', activityIds: 'com.xiaomi.market.ui.FloatWebActivity',
rules: "Button[text='关闭']", rules: 'Button[text=\'关闭\']',
}, },
], ],
}); });

View File

@ -2,15 +2,15 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.xiaomi.shop', id: 'com.xiaomi.shop',
name: `小米商城`, name: '小米商城',
groups: [ groups: [
{ {
key: 0, key: 0,
name: `开屏广告`, name: '开屏广告',
activityIds: `com.xiaomi.shop.activity.MainTabActivity`, activityIds: 'com.xiaomi.shop.activity.MainTabActivity',
rules: `[id="com.xiaomi.shop:id/skip"]`, rules: '[id="com.xiaomi.shop:id/skip"]',
snapshotUrls: [ snapshotUrls: [
`https://gkd-kit.gitee.io/import/38517192/9083b291-43f8-4d92-a506-a9dc6ed0156f`, 'https://gkd-kit.gitee.io/import/38517192/9083b291-43f8-4d92-a506-a9dc6ed0156f',
], ],
}, },
], ],

View File

@ -2,21 +2,21 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.ximalaya.ting.lite', id: 'com.ximalaya.ting.lite',
name: `喜马拉雅极速版`, name: '喜马拉雅极速版',
groups: [ groups: [
{ {
key: 1, key: 1,
name: `开屏广告`, name: '开屏广告',
activityIds: `com.ximalaya.ting.android.host.activity.WelComeActivity`, activityIds: 'com.ximalaya.ting.android.host.activity.WelComeActivity',
rules: [ rules: [
`[id="com.ximalaya.ting.lite:id/host_common_time_countdown_text_view"]`, '[id="com.ximalaya.ting.lite:id/host_common_time_countdown_text_view"]',
], ],
}, },
{ {
key: 0, key: 0,
name: '首页-推荐-卡片广告', name: '首页-推荐-卡片广告',
activityIds: 'com.ximalaya.ting.android.host.activity.MainActivity', activityIds: 'com.ximalaya.ting.android.host.activity.MainActivity',
rules: "[id='com.ximalaya.ting.lite:id/main_ad_top_home_iv_close']", rules: '[id=\'com.ximalaya.ting.lite:id/main_ad_top_home_iv_close\']',
}, },
], ],
}); });

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.xunlei.downloadprovider', id: 'com.xunlei.downloadprovider',
name: `迅雷`, name: '迅雷',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.yek.android.kfc.activitys', id: 'com.yek.android.kfc.activitys',
name: `肯德基`, name: '肯德基',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.yipiao', id: 'com.yipiao',
name: `智行火车票12306抢票`, name: '智行火车票12306抢票',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.zhihu.android', id: 'com.zhihu.android',
name: `知乎`, name: '知乎',
groups: [ groups: [
{ {
key: 0, key: 0,
@ -48,10 +48,10 @@ export default defineAppConfig({
{ {
key: 5, key: 5,
name: '推荐页广告卡片', name: '推荐页广告卡片',
desc: `赚稿费广告卡片,盐选推荐广告,知乎学课堂,汽车广告`, desc: '赚稿费广告卡片,盐选推荐广告,知乎学课堂,汽车广告',
activityIds: 'com.zhihu.android.app.ui.activity.MainActivity', activityIds: 'com.zhihu.android.app.ui.activity.MainActivity',
rules: [ rules: [
`[id='com.zhihu.android:id/content'] >2 TextView[text='不感兴趣'][id='com.zhihu.android:id/title']`, // 1686989681860 '[id=\'com.zhihu.android:id/content\'] >2 TextView[text=\'不感兴趣\'][id=\'com.zhihu.android:id/title\']', // 1686989681860
'TextView[text=`内容质量差`][id=`com.zhihu.android:id/tv_content`]', 'TextView[text=`内容质量差`][id=`com.zhihu.android:id/tv_content`]',
'@ImageView[id=`com.zhihu.android:id/menu`] < FrameLayout - * > TextView[text^=`广告`]', // 1687913210243 1686989714786 '@ImageView[id=`com.zhihu.android:id/menu`] < FrameLayout - * > TextView[text^=`广告`]', // 1687913210243 1686989714786
'@ImageView[id=null][clickable=true] -n TextView[text*=`广告`][index=0]', // 1687418944396 1686924015259 '@ImageView[id=null][clickable=true] -n TextView[text*=`广告`][index=0]', // 1687418944396 1686924015259
@ -63,7 +63,7 @@ export default defineAppConfig({
activityIds: 'com.zhihu.android.ContentActivity', activityIds: 'com.zhihu.android.ContentActivity',
rules: [ rules: [
'@ImageView -n TextView[text=`广告`][index=0]', // 1687787712268 1687787635158 '@ImageView -n TextView[text=`广告`][index=0]', // 1687787712268 1687787635158
`ImageView[id=null] + TextView[text!=null][id=null] + ViewGroup > ImageView[clickable=true]`, // 1688028432747 'ImageView[id=null] + TextView[text!=null][id=null] + ViewGroup > ImageView[clickable=true]', // 1688028432747
], ],
}, },
{ {
@ -83,7 +83,7 @@ export default defineAppConfig({
'TextView[text$=`的广告`] - Image[id=null]', 'TextView[text$=`的广告`] - Image[id=null]',
'TextView[text*=`广告`] +2 Image[id=null]', // 1687338556331 'TextView[text*=`广告`] +2 Image[id=null]', // 1687338556331
'TextView[text*=`点赞`][text*=`的回答`] +2 Image[id=null]', // 1687076663768 1686969672948 'TextView[text*=`点赞`][text*=`的回答`] +2 Image[id=null]', // 1687076663768 1686969672948
`TextView[text=''] + Image[text=''] + TextView[text='\u200b'] + Image[id=null][clickable=true]`, // 1687234636980 'TextView[text=\'\'] + Image[text=\'\'] + TextView[text=\'\u200b\'] + Image[id=null][clickable=true]', // 1687234636980
], ],
}, },
{ {
@ -94,10 +94,10 @@ export default defineAppConfig({
}, },
{ {
key: 9, key: 9,
name: `推荐页-顶部广告`, name: '推荐页-顶部广告',
activityIds: `com.zhihu.android.app.ui.activity.MainActivity`, activityIds: 'com.zhihu.android.app.ui.activity.MainActivity',
rules: [ rules: [
`[id='com.zhihu.android:id/tv_ad_tag'] + [id='com.zhihu.android:id/img_close_focus']`, // 1686911063850 '[id=\'com.zhihu.android:id/tv_ad_tag\'] + [id=\'com.zhihu.android:id/img_close_focus\']', // 1686911063850
], ],
}, },
], ],

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'com.zidongdianji', id: 'com.zidongdianji',
name: `自动点击器`, name: '自动点击器',
groups: [ groups: [
{ {
key: 0, key: 0,

View File

@ -2,21 +2,21 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'gov.pianzong.androidnga', id: 'gov.pianzong.androidnga',
name: `NGA玩家社区`, name: 'NGA玩家社区',
groups: [ groups: [
{ {
key: 0, key: 0,
name: `开屏广告`, name: '开屏广告',
activityIds: `gov.pianzong.androidnga.activity.LoadingActivity`, activityIds: 'gov.pianzong.androidnga.activity.LoadingActivity',
rules: [`[id="gov.pianzong.androidnga:id/iv_tg_ad"]`], rules: ['[id="gov.pianzong.androidnga:id/iv_tg_ad"]'],
snapshotUrls: `https://gkd-kit.gitee.io/import/12476484`, snapshotUrls: 'https://gkd-kit.gitee.io/import/12476484',
}, },
{ {
key: 1, key: 1,
name: `首页-推荐-广告卡片`, name: '首页-推荐-广告卡片',
activityIds: `com.donews.nga.activitys.MainActivity`, activityIds: 'com.donews.nga.activitys.MainActivity',
rules: [`[id="gov.pianzong.androidnga:id/iv_close_ad"]`], rules: ['[id="gov.pianzong.androidnga:id/iv_close_ad"]'],
snapshotUrls: `https://gkd-kit.gitee.io/import/12482727`, snapshotUrls: 'https://gkd-kit.gitee.io/import/12482727',
}, },
], ],
}); });

View File

@ -2,11 +2,11 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'li.songe.gkd', id: 'li.songe.gkd',
name: `GKD`, name: 'GKD',
groups: [ groups: [
{ {
key: 0, key: 0,
name: `GKD-空规则组`, name: 'GKD-空规则组',
}, },
], ],
}); });

View File

@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({ export default defineAppConfig({
id: 'tv.danmaku.bili', id: 'tv.danmaku.bili',
name: `B站`, name: 'B站',
groups: [ groups: [
{ {
key: -1, key: -1,
@ -41,7 +41,7 @@ export default defineAppConfig({
{ {
activityIds: 'com.bilibili.lib.ui.menu', activityIds: 'com.bilibili.lib.ui.menu',
matches: matches:
"TextView[text='广告质量差'||text='推广质量差'][id^='tv.danmaku.bili:id/reason']", // 1691203420529 'TextView[text=\'广告质量差\'||text=\'推广质量差\'][id^=\'tv.danmaku.bili:id/reason\']', // 1691203420529
}, },
], ],
}, },

View File

@ -8,7 +8,7 @@ const apps: AppConfig[] = [];
for await (const tsFp of walk(process.cwd() + '/src/apps')) { for await (const tsFp of walk(process.cwd() + '/src/apps')) {
const mod: AppConfigMudule = await import(url.pathToFileURL(tsFp).href); const mod: AppConfigMudule = await import(url.pathToFileURL(tsFp).href);
const appConfig = mod.default; const appConfig = mod.default;
if (path.basename(tsFp, `.ts`) != appConfig.id) { if (path.basename(tsFp, '.ts') != appConfig.id) {
throw new Error( throw new Error(
`${picocolors.blue( `${picocolors.blue(
tsFp, tsFp,
@ -24,9 +24,9 @@ for await (const tsFp of walk(process.cwd() + '/src/apps')) {
apps.sort((a, b) => (a.id > b.id ? 1 : -1)); apps.sort((a, b) => (a.id > b.id ? 1 : -1));
const subsConfig: SubscriptionConfig = { const subsConfig: SubscriptionConfig = {
id: 0, id: 0,
name: `默认订阅`, name: '默认订阅',
author: `lisonge`, author: 'lisonge',
supportUri: `https://github.com/gkd-kit/subscription`, supportUri: 'https://github.com/gkd-kit/subscription',
apps, apps,
}; };

View File

@ -15,24 +15,24 @@ const iArrayToArray = <T>(array: IArray<T> = []): T[] => {
}; };
const sortKeys: (keyof SubscriptionConfig)[] = [ const sortKeys: (keyof SubscriptionConfig)[] = [
`id`, 'id',
`name`, 'name',
`version`, 'version',
`author`, 'author',
'supportUri', 'supportUri',
`updateUrl`, 'updateUrl',
`apps`, 'apps',
]; ];
export const writeConfig = async (fp: string, config: SubscriptionConfig) => { export const writeConfig = async (fp: string, config: SubscriptionConfig) => {
const newConfig: SubscriptionConfig = { ...config }; const newConfig: SubscriptionConfig = { ...config };
const oldConfig: SubscriptionConfig = JSON.parse( const oldConfig: SubscriptionConfig = JSON.parse(
await fs.readFile(fp, 'utf-8').catch(() => `{}`), await fs.readFile(fp, 'utf-8').catch(() => '{}'),
); );
newConfig.version = oldConfig.version ?? 0; newConfig.version = oldConfig.version ?? 0;
if (_.isEqual(newConfig, oldConfig)) { if (_.isEqual(newConfig, oldConfig)) {
console.log([oldConfig.name, `nothing changed, skip`]); console.log([oldConfig.name, 'nothing changed, skip']);
return; return;
} }
newConfig.version++; newConfig.version++;
@ -50,18 +50,18 @@ export const writeConfig = async (fp: string, config: SubscriptionConfig) => {
); );
await fs.writeFile(fp, buffer); await fs.writeFile(fp, buffer);
const newPkg = { ...selfPkg, version: `0.0.` + newConfig.version }; const newPkg = { ...selfPkg, version: '0.0.' + newConfig.version };
await fs.writeFile( await fs.writeFile(
process.cwd() + '/package.json', process.cwd() + '/package.json',
JSON.stringify(newPkg, void 0, 2) + `\n`, JSON.stringify(newPkg, void 0, 2) + '\n',
); );
await updateReadMeMd(newConfig); await updateReadMeMd(newConfig);
console.log({ console.log({
mtime: dayjs().format(`HH:mm:ss`), mtime: dayjs().format('HH:mm:ss'),
name: newConfig.name, name: newConfig.name,
size: (buffer.length / 1024).toFixed(3) + `KB`, size: (buffer.length / 1024).toFixed(3) + 'KB',
version: newConfig.version, version: newConfig.version,
}); });
}; };
@ -95,7 +95,7 @@ export const checkConfig = (newConfig: SubscriptionConfig) => {
groupName: g.name, groupName: g.name,
groupKey: g.key, groupKey: g.key,
}); });
throw new Error(`invalid duplicated group key`); throw new Error('invalid duplicated group key');
} }
keys.add(g.key); keys.add(g.key);
}); });
@ -120,7 +120,7 @@ export const checkConfig = (newConfig: SubscriptionConfig) => {
parseSelector(selector); parseSelector(selector);
} catch (e) { } catch (e) {
console.error({ console.error({
message: `invalid selector syntax`, message: 'invalid selector syntax',
appId: app.id, appId: app.id,
groupKey: g.key, groupKey: g.key,
selector, selector,
@ -137,7 +137,7 @@ export const checkConfig = (newConfig: SubscriptionConfig) => {
sortKeys, sortKeys,
newKeys, newKeys,
}); });
throw new Error(`sortKeys miss some new key`); throw new Error('sortKeys miss some new key');
} }
}; };
@ -150,7 +150,7 @@ export const updateReadMeMd = async (newConfig: SubscriptionConfig) => {
?.map((group) => { ?.map((group) => {
const groupNameMdText = const groupNameMdText =
`- ${group.name}` + `- ${group.name}` +
(group.desc ? ` - ${group.desc}` : ``).trimEnd(); (group.desc ? ` - ${group.desc}` : '').trimEnd();
const exampleUrls: string[] = []; const exampleUrls: string[] = [];
exampleUrls.push(...iArrayToArray(group.exampleUrls)); exampleUrls.push(...iArrayToArray(group.exampleUrls));
@ -170,7 +170,7 @@ export const updateReadMeMd = async (newConfig: SubscriptionConfig) => {
return ` - [示例-${i}](${u})`; return ` - [示例-${i}](${u})`;
} }
}) })
.join(`\n`) .join('\n')
.trimEnd(); .trimEnd();
const snapshotUrls: string[] = []; const snapshotUrls: string[] = [];
@ -191,28 +191,28 @@ export const updateReadMeMd = async (newConfig: SubscriptionConfig) => {
return ` - [快照-${i}](${u})`; return ` - [快照-${i}](${u})`;
} }
}) })
.join(`\n`); .join('\n');
return [groupNameMdText, exampleMdText, snapshotMdText] return [groupNameMdText, exampleMdText, snapshotMdText]
.filter((s) => s) .filter((s) => s)
.join(`\n`) .join('\n')
.trimEnd(); .trimEnd();
}) })
.join(`\n`) .join('\n')
.trimEnd(); .trimEnd();
return [appMdText, groupMdText].join(`\n`).trimEnd(); return [appMdText, groupMdText].join('\n').trimEnd();
}) })
.join(`\n\n`) .join('\n\n')
.trimEnd(); .trimEnd();
const readMeMdText = mdTemplate const readMeMdText = mdTemplate
.replace(`--APP_SIZE--`, newConfig.apps.length.toString()) .replace('--APP_SIZE--', newConfig.apps.length.toString())
.replace( .replace(
`--GROUP_SIZE--`, '--GROUP_SIZE--',
newConfig.apps newConfig.apps
.reduce((p, c) => p + (c.groups?.length || 0), 0) .reduce((p, c) => p + (c.groups?.length || 0), 0)
.toString(), .toString(),
) )
.replace(`--APP_LIST--`, appListText); .replace('--APP_LIST--', appListText);
await fs.writeFile(process.cwd() + '/README.md', readMeMdText); await fs.writeFile(process.cwd() + '/README.md', readMeMdText);
}; };