diff --git a/.eslintrc.cjs b/.eslintrc.cjs index e70fc39b..5e08f8c9 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -18,5 +18,6 @@ module.exports = defineConfig({ '@typescript-eslint/no-explicit-any': 'off', 'no-empty': 'off', 'prefer-const': 'off', + quotes: ['error', 'single', { allowTemplateLiterals: false }], }, }); diff --git a/scripts/build.ts b/scripts/build.ts index 5ee547b7..146d3831 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -1,4 +1,4 @@ import subsConfig from '../src/config'; import { writeConfig } from '../src/file'; -await writeConfig(process.cwd() + `/dist/gkd.json`, subsConfig); +await writeConfig(process.cwd() + '/dist/gkd.json', subsConfig); diff --git a/scripts/check.ts b/scripts/check.ts index be94822c..ea068a06 100644 --- a/scripts/check.ts +++ b/scripts/check.ts @@ -4,4 +4,4 @@ import picocolors from 'picocolors'; checkConfig(subsConfig); -console.log(picocolors.green(`校验成功, 合法订阅`)); +console.log(picocolors.green('校验成功, 合法订阅')); diff --git a/src/apps/air.tv.douyu.android.ts b/src/apps/air.tv.douyu.android.ts index a6b9cc88..01af8a6e 100644 --- a/src/apps/air.tv.douyu.android.ts +++ b/src/apps/air.tv.douyu.android.ts @@ -2,34 +2,37 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'air.tv.douyu.android', - name: `斗鱼`, + name: '斗鱼', groups: [ { key: 0, name: '开屏广告', activityIds: [ 'com.douyu.module.home.pages.main.MainActivity', - `com.douyu.module.ad.launch.HotStartSplashActivity`, + 'com.douyu.module.ad.launch.HotStartSplashActivity', ], rules: [ { - matches: `@TextView[text^='跳过'] + LinearLayout TextView[text*="跳转"]`, - snapshotUrls: `https://gkd-kit.gitee.io/import/38517192/50c858ee-d331-4d5a-b5db-5eb17323c5ff`, + matches: + '@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, - name: `青少年模式`, - desc: `关闭青少年模式提醒弹窗`, + name: '青少年模式', + desc: '关闭青少年模式提醒弹窗', activityIds: [ - `com.douyu.module.young.view.YoungModeGuideDialog`, - `com.douyu.module.home.pages.main.MainActivity`, + 'com.douyu.module.young.view.YoungModeGuideDialog', + '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: [ - `[text='开启青少年模式'] + [text='我知道了']`, // 1686970236642 + '[text=\'开启青少年模式\'] + [text=\'我知道了\']', // 1686970236642 ], }, { diff --git a/src/apps/cn.damai.ts b/src/apps/cn.damai.ts index 536b3de0..f1b851ac 100644 --- a/src/apps/cn.damai.ts +++ b/src/apps/cn.damai.ts @@ -2,14 +2,15 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'cn.damai', - name: `大麦`, + name: '大麦', groups: [ { key: 0, - name: `开屏广告`, - activityIds: `cn.damai.launcher.splash.SplashMainActivity`, - rules: `[id="cn.damai:id/homepage_advert_pb"]`, - snapshotUrls: `https://gkd-kit.gitee.io/import/38517192/38859663-6f0c-48b1-9392-20ae937a8c9e`, + name: '开屏广告', + activityIds: 'cn.damai.launcher.splash.SplashMainActivity', + rules: '[id="cn.damai:id/homepage_advert_pb"]', + snapshotUrls: + 'https://gkd-kit.gitee.io/import/38517192/38859663-6f0c-48b1-9392-20ae937a8c9e', }, ], }); diff --git a/src/apps/com.MobileTicket.ts b/src/apps/com.MobileTicket.ts index 432bc8d0..701dbb92 100644 --- a/src/apps/com.MobileTicket.ts +++ b/src/apps/com.MobileTicket.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.MobileTicket', - name: `铁路12306`, + name: '铁路12306', groups: [ { key: 0, diff --git a/src/apps/com.UCMobile.ts b/src/apps/com.UCMobile.ts index 2e4a43b6..6464790c 100644 --- a/src/apps/com.UCMobile.ts +++ b/src/apps/com.UCMobile.ts @@ -2,13 +2,13 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.UCMobile', - name: `UC浏览器`, + name: 'UC浏览器', groups: [ { key: -1, - name: `开屏广告`, - desc: `空规则组-待实现`, - activityIds: `com.uc.browser.InnerUCMobile`, + name: '开屏广告', + desc: '空规则组-待实现', + activityIds: 'com.uc.browser.InnerUCMobile', // TODO }, { diff --git a/src/apps/com.achievo.vipshop.ts b/src/apps/com.achievo.vipshop.ts index 874e7fe7..4d4ae50c 100644 --- a/src/apps/com.achievo.vipshop.ts +++ b/src/apps/com.achievo.vipshop.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.achievo.vipshop', - name: `唯品会`, + name: '唯品会', groups: [ { key: 0, diff --git a/src/apps/com.alibaba.wireless.ts b/src/apps/com.alibaba.wireless.ts index 56fdf0db..9d68c811 100644 --- a/src/apps/com.alibaba.wireless.ts +++ b/src/apps/com.alibaba.wireless.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.alibaba.wireless', - name: `阿里巴巴`, + name: '阿里巴巴', groups: [ { key: 0, diff --git a/src/apps/com.android.bankabc.ts b/src/apps/com.android.bankabc.ts index ef37beb8..9d29dc4a 100644 --- a/src/apps/com.android.bankabc.ts +++ b/src/apps/com.android.bankabc.ts @@ -2,14 +2,15 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.android.bankabc', - name: `中国农业银行`, + name: '中国农业银行', groups: [ { key: 0, - name: `开屏广告`, - activityIds: `com.alipay.mobile.quinox.LauncherActivity`, - rules: [`ImageView[id="com.android.bankabc:id/close"]`], - snapshotUrls: `https://gkd-kit.gitee.io/import/38517192/3653218a-e0e0-4a60-8308-dea5fd4179b3`, + name: '开屏广告', + activityIds: 'com.alipay.mobile.quinox.LauncherActivity', + rules: ['ImageView[id="com.android.bankabc:id/close"]'], + snapshotUrls: + 'https://gkd-kit.gitee.io/import/38517192/3653218a-e0e0-4a60-8308-dea5fd4179b3', }, ], }); diff --git a/src/apps/com.android.thememanager.ts b/src/apps/com.android.thememanager.ts index 01453b59..2a32ebe5 100644 --- a/src/apps/com.android.thememanager.ts +++ b/src/apps/com.android.thememanager.ts @@ -2,12 +2,12 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.android.thememanager', - name: `miui主题壁纸`, + name: 'miui主题壁纸', groups: [ { key: 1, name: '推荐下广告', - desc: `注意如果使用ADB禁用了MIUI广告组件,点击此按钮会无反应,可关闭此规则,避免过多相同点击记录`, + desc: '注意如果使用ADB禁用了MIUI广告组件,点击此按钮会无反应,可关闭此规则,避免过多相同点击记录', rules: '[id=`com.android.thememanager:id/ad_close_btn`]', }, ], diff --git a/src/apps/com.anjuke.android.app.ts b/src/apps/com.anjuke.android.app.ts index 4015399e..3f5113e1 100644 --- a/src/apps/com.anjuke.android.app.ts +++ b/src/apps/com.anjuke.android.app.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.anjuke.android.app', - name: `安居客`, + name: '安居客', groups: [ { key: 0, diff --git a/src/apps/com.baidu.BaiduMap.ts b/src/apps/com.baidu.BaiduMap.ts index d7069588..73bfeff1 100644 --- a/src/apps/com.baidu.BaiduMap.ts +++ b/src/apps/com.baidu.BaiduMap.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.baidu.BaiduMap', - name: `百度地图`, + name: '百度地图', groups: [ { key: 0, @@ -10,7 +10,7 @@ export default defineAppConfig({ activityIds: 'com.baidu.baidumaps.MapsActivity', rules: [ '@TextView[text^=`跳过`] + TextView[text=`广告`]', - `ImageView[clickable=false] + TextView[text^='跳过'][clickable=true]`, // 1689423368140 + 'ImageView[clickable=false] + TextView[text^=\'跳过\'][clickable=true]', // 1689423368140 ], }, ], diff --git a/src/apps/com.baidu.homework.ts b/src/apps/com.baidu.homework.ts index e88cf6fe..6aaa9db0 100644 --- a/src/apps/com.baidu.homework.ts +++ b/src/apps/com.baidu.homework.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.baidu.homework', - name: `作业帮`, + name: '作业帮', groups: [ { key: 0, diff --git a/src/apps/com.baidu.netdisk.ts b/src/apps/com.baidu.netdisk.ts index 53f67cc1..7f3f86bd 100644 --- a/src/apps/com.baidu.netdisk.ts +++ b/src/apps/com.baidu.netdisk.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.baidu.netdisk', - name: `百度网盘`, + name: '百度网盘', groups: [ { key: 0, @@ -10,11 +10,12 @@ export default defineAppConfig({ activityIds: 'com.baidu.netdisk.ui.Navigate', rules: [ { - matches: `TextView[text="跳过"][clickable=true]`, - snapshotUrls: `https://gkd-kit.gitee.io/import/38517192/edc1d0a6-ebdd-48b0-9e11-f0b2c277c40a`, + matches: 'TextView[text="跳过"][clickable=true]', + snapshotUrls: + 'https://gkd-kit.gitee.io/import/38517192/edc1d0a6-ebdd-48b0-9e11-f0b2c277c40a', }, '@TextView[text^=`跳过`] + TextView[text=`广告`]', - `[id='com.byted.pangle:id/tt_splash_skip_btn']`, // 1687136781353 + '[id=\'com.byted.pangle:id/tt_splash_skip_btn\']', // 1687136781353 ], }, ], diff --git a/src/apps/com.baidu.tieba.ts b/src/apps/com.baidu.tieba.ts index c22daf98..c5d3071e 100644 --- a/src/apps/com.baidu.tieba.ts +++ b/src/apps/com.baidu.tieba.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.baidu.tieba', - name: `百度贴吧`, + name: '百度贴吧', groups: [ { key: 0, @@ -64,18 +64,18 @@ export default defineAppConfig({ }, { key: 6, - name: `首页左侧游戏广告小图标`, - activityIds: `com.baidu.tieba.tblauncher.MainTabActivity`, + name: '首页左侧游戏广告小图标', + activityIds: 'com.baidu.tieba.tblauncher.MainTabActivity', 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, - name: `升级弹窗`, - activityIds: `com.baidu.tieba.UpdateDialog`, - rules: `[text="稍后再说"]`, - snapshotUrls: `https://gkd-kit.gitee.io/import/12496934`, + name: '升级弹窗', + activityIds: 'com.baidu.tieba.UpdateDialog', + rules: '[text="稍后再说"]', + snapshotUrls: 'https://gkd-kit.gitee.io/import/12496934', }, ], }); diff --git a/src/apps/com.bjsk.intelligent.ts b/src/apps/com.bjsk.intelligent.ts index 4a3abfeb..3b3d5acd 100644 --- a/src/apps/com.bjsk.intelligent.ts +++ b/src/apps/com.bjsk.intelligent.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.bjsk.intelligent', - name: `WiFi智能钥匙`, + name: 'WiFi智能钥匙', groups: [ { key: 0, diff --git a/src/apps/com.cmcc.cmvideo.ts b/src/apps/com.cmcc.cmvideo.ts index c907f7f2..122f2cda 100644 --- a/src/apps/com.cmcc.cmvideo.ts +++ b/src/apps/com.cmcc.cmvideo.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.cmcc.cmvideo', - name: `咪咕视频`, + name: '咪咕视频', groups: [ { key: 0, @@ -12,17 +12,17 @@ export default defineAppConfig({ }, { key: 1, - name: `青少年模式弹窗`, - activityIds: `com.cmcc.cmvideo.main.application.CompatibleMainActivity`, - rules: `[id="com.cmcc.cmvideo:id/btn_cancle"]`, - snapshotUrls: `https://gkd-kit.gitee.io/import/12498307`, + name: '青少年模式弹窗', + activityIds: 'com.cmcc.cmvideo.main.application.CompatibleMainActivity', + rules: '[id="com.cmcc.cmvideo:id/btn_cancle"]', + snapshotUrls: 'https://gkd-kit.gitee.io/import/12498307', }, { key: 2, - name: `右下角小广告`, - activityIds: `com.cmcc.cmvideo.main.application.CompatibleMainActivity`, - rules: `[id="com.cmcc.cmvideo:id/iv_right_bottom_close"]`, - snapshotUrls: `https://gkd-kit.gitee.io/import/12498315`, + name: '右下角小广告', + activityIds: 'com.cmcc.cmvideo.main.application.CompatibleMainActivity', + rules: '[id="com.cmcc.cmvideo:id/iv_right_bottom_close"]', + snapshotUrls: 'https://gkd-kit.gitee.io/import/12498315', }, ], }); diff --git a/src/apps/com.coolapk.market.ts b/src/apps/com.coolapk.market.ts index 494d702c..1b2e0cb5 100644 --- a/src/apps/com.coolapk.market.ts +++ b/src/apps/com.coolapk.market.ts @@ -2,19 +2,19 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.coolapk.market', - name: `酷安`, + name: '酷安', groups: [ { key: -1, - name: `开屏广告`, + name: '开屏广告', activityIds: [ - `com.coolapk.market.view.splash.SplashActivity`, - `com.coolapk.market.view.main.MainActivity`, + 'com.coolapk.market.view.splash.SplashActivity', + 'com.coolapk.market.view.main.MainActivity', ], - rules: `[id$=":id/tt_splash_skip_btn"]`, + rules: '[id$=":id/tt_splash_skip_btn"]', snapshotUrls: [ - `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/38517192/4ba30986-55d4-4a94-b7e2-6cf7d9c6d66d', + 'https://gkd-kit.gitee.io/import/12503773', ], }, { @@ -32,19 +32,20 @@ export default defineAppConfig({ 'com.coolapk.market.view.main.MainActivity', '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=`不感兴趣`]', }, - `Button[text$="免广告"] + Button[text="不感兴趣"]`, // 1692148279610 + 'Button[text$="免广告"] + Button[text="不感兴趣"]', // 1692148279610 'Button[text$=`去广告`] - Button[text=`不感兴趣`]', '[id=`com.coolapk.market:id/close_view`]', ], }, { key: 1, - name: `关闭升级弹窗`, - activityIds: `com.coolapk.market.view.main.MainActivity`, - snapshotUrls: `https://gkd-kit.gitee.io/import/12503762`, + name: '关闭升级弹窗', + activityIds: 'com.coolapk.market.view.main.MainActivity', + snapshotUrls: 'https://gkd-kit.gitee.io/import/12503762', rules: '[text=`立即更新`] - [text=`取消`]', }, ], diff --git a/src/apps/com.daimajia.gold.ts b/src/apps/com.daimajia.gold.ts index dc00c6c2..fa024004 100644 --- a/src/apps/com.daimajia.gold.ts +++ b/src/apps/com.daimajia.gold.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.daimajia.gold', - name: `稀土掘金`, + name: '稀土掘金', groups: [ { key: 0, diff --git a/src/apps/com.dianping.v1.ts b/src/apps/com.dianping.v1.ts index 8245414d..e43ad0d0 100644 --- a/src/apps/com.dianping.v1.ts +++ b/src/apps/com.dianping.v1.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.dianping.v1', - name: `大众点评`, + name: '大众点评', groups: [ { key: 0, diff --git a/src/apps/com.dragon.read.ts b/src/apps/com.dragon.read.ts index 980c318c..2409654d 100644 --- a/src/apps/com.dragon.read.ts +++ b/src/apps/com.dragon.read.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.dragon.read', - name: `番茄免费小说`, + name: '番茄免费小说', groups: [ { key: 0, diff --git a/src/apps/com.duokan.phone.remotecontroller.ts b/src/apps/com.duokan.phone.remotecontroller.ts index d9c5ec7f..34c85fd8 100644 --- a/src/apps/com.duokan.phone.remotecontroller.ts +++ b/src/apps/com.duokan.phone.remotecontroller.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.duokan.phone.remotecontroller', - name: `万能遥控`, + name: '万能遥控', groups: [ { key: 0, diff --git a/src/apps/com.duowan.kiwi.ts b/src/apps/com.duowan.kiwi.ts index 794c01b9..02ef333b 100644 --- a/src/apps/com.duowan.kiwi.ts +++ b/src/apps/com.duowan.kiwi.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.duowan.kiwi', - name: `虎牙直播`, + name: '虎牙直播', groups: [ { key: 0, diff --git a/src/apps/com.google.android.youtube.ts b/src/apps/com.google.android.youtube.ts index 3bddde53..58cadbfc 100644 --- a/src/apps/com.google.android.youtube.ts +++ b/src/apps/com.google.android.youtube.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.google.android.youtube', - name: `youtube`, + name: 'youtube', groups: [ { key: 0, diff --git a/src/apps/com.gotokeep.keep.ts b/src/apps/com.gotokeep.keep.ts index 2c85c7ea..625f8f08 100644 --- a/src/apps/com.gotokeep.keep.ts +++ b/src/apps/com.gotokeep.keep.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.gotokeep.keep', - name: `Keep`, + name: 'Keep', groups: [ { key: 0, diff --git a/src/apps/com.greenpoint.android.mc10086.activity.ts b/src/apps/com.greenpoint.android.mc10086.activity.ts index dff1135d..d1178542 100644 --- a/src/apps/com.greenpoint.android.mc10086.activity.ts +++ b/src/apps/com.greenpoint.android.mc10086.activity.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.greenpoint.android.mc10086.activity', - name: `中国移动`, + name: '中国移动', groups: [ { key: 0, diff --git a/src/apps/com.handsgo.jiakao.android.ts b/src/apps/com.handsgo.jiakao.android.ts index f163b998..f3997f5f 100644 --- a/src/apps/com.handsgo.jiakao.android.ts +++ b/src/apps/com.handsgo.jiakao.android.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.handsgo.jiakao.android', - name: `驾考宝典`, + name: '驾考宝典', groups: [ { key: 0, diff --git a/src/apps/com.hunantv.imgo.activity.ts b/src/apps/com.hunantv.imgo.activity.ts index dbe2c282..109b1f9d 100644 --- a/src/apps/com.hunantv.imgo.activity.ts +++ b/src/apps/com.hunantv.imgo.activity.ts @@ -2,20 +2,22 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.hunantv.imgo.activity', - name: `芒果TV`, + name: '芒果TV', groups: [ { key: -1, - name: `开屏广告`, - activityIds: `com.hunantv.imgo.activity.MainActivity`, + name: '开屏广告', + activityIds: 'com.hunantv.imgo.activity.MainActivity', rules: [ { - matches: `[id="com.hunantv.imgo.activity:id/layout_boot_skip"]`, - snapshotUrls: `https://gkd-kit.gitee.io/import/38517192/7202bd0a-a5c6-4ec4-9547-bf4ca6d372d0`, + matches: '[id="com.hunantv.imgo.activity:id/layout_boot_skip"]', + snapshotUrls: + 'https://gkd-kit.gitee.io/import/38517192/7202bd0a-a5c6-4ec4-9547-bf4ca6d372d0', }, { - matches: `TextView[text!=null] - [text^="跳过"]`, - snapshotUrls: `https://gkd-kit.gitee.io/import/38517192/7202bd0a-a5c6-4ec4-9547-bf4ca6d372d0`, + matches: 'TextView[text!=null] - [text^="跳过"]', + snapshotUrls: + 'https://gkd-kit.gitee.io/import/38517192/7202bd0a-a5c6-4ec4-9547-bf4ca6d372d0', }, ], }, @@ -30,16 +32,19 @@ export default defineAppConfig({ }, { key: 1, - name: `首页推荐流-卡片广告`, - activityIds: `com.hunantv.imgo.activity.MainActivity`, + name: '首页推荐流-卡片广告', + activityIds: 'com.hunantv.imgo.activity.MainActivity', rules: [ { 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"]`, - snapshotUrls: `https://gkd-kit.gitee.io/import/38517192/b74150b5-8e9f-4cbb-86a7-722fc739a1b8`, + matches: + '@[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', }, ], }, diff --git a/src/apps/com.hupu.shihuo.ts b/src/apps/com.hupu.shihuo.ts index 33fc6479..24185f94 100644 --- a/src/apps/com.hupu.shihuo.ts +++ b/src/apps/com.hupu.shihuo.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.hupu.shihuo', - name: `识货`, + name: '识货', groups: [ { key: 0, diff --git a/src/apps/com.hxak.liangongbao.ts b/src/apps/com.hxak.liangongbao.ts index 87f56ff5..517e8e2c 100644 --- a/src/apps/com.hxak.liangongbao.ts +++ b/src/apps/com.hxak.liangongbao.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.hxak.liangongbao', - name: `链工宝`, + name: '链工宝', groups: [ { key: 0, diff --git a/src/apps/com.icbc.ts b/src/apps/com.icbc.ts index 3f5b072e..090307aa 100644 --- a/src/apps/com.icbc.ts +++ b/src/apps/com.icbc.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.icbc', - name: `中国工商银行`, + name: '中国工商银行', groups: [ { key: 0, diff --git a/src/apps/com.intsig.camscanner.ts b/src/apps/com.intsig.camscanner.ts index 7d51508d..2fdf513b 100644 --- a/src/apps/com.intsig.camscanner.ts +++ b/src/apps/com.intsig.camscanner.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.intsig.camscanner', - name: `扫描全能王`, + name: '扫描全能王', groups: [ { key: 0, diff --git a/src/apps/com.iqiyi.hotchat.ts b/src/apps/com.iqiyi.hotchat.ts index 5c13bd70..75d783b3 100644 --- a/src/apps/com.iqiyi.hotchat.ts +++ b/src/apps/com.iqiyi.hotchat.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.iqiyi.hotchat', - name: `爱奇艺热聊`, + name: '爱奇艺热聊', groups: [ { key: 0, diff --git a/src/apps/com.jym.mall.ts b/src/apps/com.jym.mall.ts index 139415b0..33a8238a 100644 --- a/src/apps/com.jym.mall.ts +++ b/src/apps/com.jym.mall.ts @@ -2,13 +2,13 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.jym.mall', - name: `交易猫`, + name: '交易猫', groups: [ { key: 0, - name: `升级弹窗`, - rules: `[id="com.jym.mall:id/tv_cancel"][text="下次再说"]`, - snapshotUrls: `https://gkd-kit.gitee.io/import/12496974`, + name: '升级弹窗', + rules: '[id="com.jym.mall:id/tv_cancel"][text="下次再说"]', + snapshotUrls: 'https://gkd-kit.gitee.io/import/12496974', }, ], }); diff --git a/src/apps/com.kmxs.reader.ts b/src/apps/com.kmxs.reader.ts index 2e0cace7..c73e7312 100644 --- a/src/apps/com.kmxs.reader.ts +++ b/src/apps/com.kmxs.reader.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.kmxs.reader', - name: `七猫免费小说`, + name: '七猫免费小说', groups: [ { key: 0, diff --git a/src/apps/com.kuaikan.comic.ts b/src/apps/com.kuaikan.comic.ts index fc8bc54f..83b359e0 100644 --- a/src/apps/com.kuaikan.comic.ts +++ b/src/apps/com.kuaikan.comic.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.kuaikan.comic', - name: `快看`, + name: '快看', groups: [ { key: 0, diff --git a/src/apps/com.kugou.android.ts b/src/apps/com.kugou.android.ts index a1f922ab..09463416 100644 --- a/src/apps/com.kugou.android.ts +++ b/src/apps/com.kugou.android.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.kugou.android', - name: `酷狗音乐`, + name: '酷狗音乐', groups: [ { key: 0, diff --git a/src/apps/com.kwai.videoeditor.ts b/src/apps/com.kwai.videoeditor.ts index d9109dd9..ac5180d3 100644 --- a/src/apps/com.kwai.videoeditor.ts +++ b/src/apps/com.kwai.videoeditor.ts @@ -2,14 +2,16 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.kwai.videoeditor', - name: `快影`, + name: '快影', groups: [ { key: 0, - name: `开屏广告`, - activityIds: `com.kwai.videoeditor.activity.splash.InnerVideoSplashActivity`, - rules: [`Button[text="跳过"]`], - snapshotUrls: `https://gkd-kit.gitee.io/import/38517192/d12c3b08-8233-4584-b2b9-595ebb4ce665`, + name: '开屏广告', + activityIds: + 'com.kwai.videoeditor.activity.splash.InnerVideoSplashActivity', + rules: ['Button[text="跳过"]'], + snapshotUrls: + 'https://gkd-kit.gitee.io/import/38517192/d12c3b08-8233-4584-b2b9-595ebb4ce665', }, ], }); diff --git a/src/apps/com.mihoyo.hyperion.ts b/src/apps/com.mihoyo.hyperion.ts index b33e9ff0..129e9ad8 100644 --- a/src/apps/com.mihoyo.hyperion.ts +++ b/src/apps/com.mihoyo.hyperion.ts @@ -2,17 +2,17 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.mihoyo.hyperion', - name: `米游社`, + name: '米游社', groups: [ { key: 0, name: '开屏广告', activityIds: [ 'com.mihoyo.hyperion.ui.SplashActivity', - `com.mihoyo.hyperion.splash.SplashActivity`, + 'com.mihoyo.hyperion.splash.SplashActivity', ], 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, diff --git a/src/apps/com.miui.player.ts b/src/apps/com.miui.player.ts index 68318a11..c26110dd 100644 --- a/src/apps/com.miui.player.ts +++ b/src/apps/com.miui.player.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.miui.player', - name: `小米音乐`, + name: '小米音乐', groups: [ { key: 0, diff --git a/src/apps/com.miui.systemAdSolution.ts b/src/apps/com.miui.systemAdSolution.ts index c6059bda..3497030d 100644 --- a/src/apps/com.miui.systemAdSolution.ts +++ b/src/apps/com.miui.systemAdSolution.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.miui.systemAdSolution', - name: `miui系统广告`, + name: 'miui系统广告', groups: [ { key: 0, @@ -12,7 +12,7 @@ export default defineAppConfig({ { key: 1, name: 'miui-为什么不希望看到这条推广', - desc: `关闭这个提示,使用ADB禁用广告组件时,点击此按钮无反应`, + desc: '关闭这个提示,使用ADB禁用广告组件时,点击此按钮无反应', activityIds: 'com.xiaomi.ad.feedback', rules: '[id=`com.miui.systemAdSolution:id/no_interest`]', }, diff --git a/src/apps/com.mt.mtxx.mtxx.ts b/src/apps/com.mt.mtxx.mtxx.ts index de30181b..411ffe83 100644 --- a/src/apps/com.mt.mtxx.mtxx.ts +++ b/src/apps/com.mt.mtxx.mtxx.ts @@ -2,14 +2,15 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.mt.mtxx.mtxx', - name: `美图秀秀`, + name: '美图秀秀', groups: [ { key: 0, name: '开屏广告', activityIds: 'com.meitu.business.ads.core.activity.AdActivity', 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', }, ], }); diff --git a/src/apps/com.netease.cloudmusic.ts b/src/apps/com.netease.cloudmusic.ts index 8c9f447b..101b1413 100644 --- a/src/apps/com.netease.cloudmusic.ts +++ b/src/apps/com.netease.cloudmusic.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.netease.cloudmusic', - name: `网易云音乐`, + name: '网易云音乐', groups: [ { key: 0, @@ -12,19 +12,21 @@ export default defineAppConfig({ }, { key: 1, - name: `广告卡片`, + name: '广告卡片', rules: [ { - activityIds: `com.netease.cloudmusic.module.ad.feedback.AdFeedbackBottomSheet`, - matches: `[text="直接关闭"]`, + activityIds: + 'com.netease.cloudmusic.module.ad.feedback.AdFeedbackBottomSheet', + matches: '[text="直接关闭"]', 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`, - matches: `[id="com.netease.cloudmusic:id/adTagClose"]`, - snapshotUrls: `https://gkd-kit.songe.li/import/38517192/a977b19d-2b3c-43df-ba01-63e7cbbb3908`, + activityIds: 'com.netease.cloudmusic.activity.MainActivity', + matches: '[id="com.netease.cloudmusic:id/adTagClose"]', + snapshotUrls: + 'https://gkd-kit.songe.li/import/38517192/a977b19d-2b3c-43df-ba01-63e7cbbb3908', }, ], }, diff --git a/src/apps/com.qidian.QDReader.ts b/src/apps/com.qidian.QDReader.ts index 8f2954e2..26730649 100644 --- a/src/apps/com.qidian.QDReader.ts +++ b/src/apps/com.qidian.QDReader.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.qidian.QDReader', - name: `起点读书`, + name: '起点读书', groups: [ { key: 0, diff --git a/src/apps/com.qiyi.video.ts b/src/apps/com.qiyi.video.ts index 3719a9c5..7a1261b3 100644 --- a/src/apps/com.qiyi.video.ts +++ b/src/apps/com.qiyi.video.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.qiyi.video', - name: `爱奇艺`, + name: '爱奇艺', groups: [ { key: 0, @@ -19,11 +19,11 @@ export default defineAppConfig({ }, { key: 2, - name: `我的-顶部广告`, - activityIds: `org.qiyi.android.video.MainActivity`, - snapshotUrls: `https://gkd-kit.gitee.io/import/12495050`, + name: '我的-顶部广告', + activityIds: 'org.qiyi.android.video.MainActivity', + snapshotUrls: 'https://gkd-kit.gitee.io/import/12495050', 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"]', ], }, ], diff --git a/src/apps/com.quark.browser.ts b/src/apps/com.quark.browser.ts index 1fe31247..592c10c1 100644 --- a/src/apps/com.quark.browser.ts +++ b/src/apps/com.quark.browser.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.quark.browser', - name: `夸克浏览器`, + name: '夸克浏览器', groups: [ { key: 0, diff --git a/src/apps/com.sankuai.meituan.takeoutnew.ts b/src/apps/com.sankuai.meituan.takeoutnew.ts index 4b005c1b..07f8162e 100644 --- a/src/apps/com.sankuai.meituan.takeoutnew.ts +++ b/src/apps/com.sankuai.meituan.takeoutnew.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.sankuai.meituan.takeoutnew', - name: `美团外卖`, + name: '美团外卖', groups: [ { key: 0, @@ -13,18 +13,19 @@ export default defineAppConfig({ }, { key: 1, - name: `关闭更新弹窗`, - activityIds: `com.sankuai.waimai.business.page.homepage.widget.dialog.UpdateForceInstallDialog`, + name: '关闭更新弹窗', + activityIds: + 'com.sankuai.waimai.business.page.homepage.widget.dialog.UpdateForceInstallDialog', 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, - name: `关闭美食广告弹窗`, - activityIds: `com.sankuai.waimai.platform.mach.dialog.DynamicDialog`, + name: '关闭美食广告弹窗', + activityIds: 'com.sankuai.waimai.platform.mach.dialog.DynamicDialog', rules: [ - `@[desc='关闭'][clickable=true] > ImageView`, // 1686969062508 + '@[desc=\'关闭\'][clickable=true] > ImageView', // 1686969062508 ], }, ], diff --git a/src/apps/com.sankuai.meituan.ts b/src/apps/com.sankuai.meituan.ts index 68843860..4117d7b3 100644 --- a/src/apps/com.sankuai.meituan.ts +++ b/src/apps/com.sankuai.meituan.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.sankuai.meituan', - name: `美团`, + name: '美团', groups: [ { key: 0, diff --git a/src/apps/com.sdu.didi.psnger.ts b/src/apps/com.sdu.didi.psnger.ts index b4d1bb9b..35bb28b9 100644 --- a/src/apps/com.sdu.didi.psnger.ts +++ b/src/apps/com.sdu.didi.psnger.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.sdu.didi.psnger', - name: `滴滴`, + name: '滴滴', groups: [ { key: 0, diff --git a/src/apps/com.sina.weibo.ts b/src/apps/com.sina.weibo.ts index aa6c1471..1ca5a71c 100644 --- a/src/apps/com.sina.weibo.ts +++ b/src/apps/com.sina.weibo.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.sina.weibo', - name: `微博`, + name: '微博', groups: [ { key: 0, @@ -18,10 +18,10 @@ export default defineAppConfig({ }, { key: 2, - name: `关闭不感兴趣广告弹窗`, - activityIds: `com.sina.weibo.view.bottomsheet.dialog.`, + name: '关闭不感兴趣广告弹窗', + activityIds: 'com.sina.weibo.view.bottomsheet.dialog.', rules: { - matches: [`[text="为何会看到此广告"]`, `[text="不感兴趣"]`], + matches: ['[text="为何会看到此广告"]', '[text="不感兴趣"]'], }, // 1688889362832 }, ], diff --git a/src/apps/com.smile.gifmaker.ts b/src/apps/com.smile.gifmaker.ts index a6a13e6a..640f254c 100644 --- a/src/apps/com.smile.gifmaker.ts +++ b/src/apps/com.smile.gifmaker.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.smile.gifmaker', - name: `快手`, + name: '快手', groups: [ { key: 0, diff --git a/src/apps/com.snda.wifilocating.ts b/src/apps/com.snda.wifilocating.ts index 9045decb..840c92c0 100644 --- a/src/apps/com.snda.wifilocating.ts +++ b/src/apps/com.snda.wifilocating.ts @@ -2,15 +2,16 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.snda.wifilocating', - name: `WiFi万能钥匙`, + name: 'WiFi万能钥匙', groups: [ { key: -1, - name: `开屏广告`, - activityIds: `com.lantern.launcher.ui.MainActivity`, - snapshotUrls: `https://gkd-kit.gitee.io/import/38517192/4d6fdd1e-28ec-4b61-86e2-641b7b5b8899`, + name: '开屏广告', + activityIds: 'com.lantern.launcher.ui.MainActivity', + snapshotUrls: + 'https://gkd-kit.gitee.io/import/38517192/4d6fdd1e-28ec-4b61-86e2-641b7b5b8899', rules: [ - `TextView[text="广告"] -3 RelativeLayout > TextView[text*="跳过"]`, + 'TextView[text="广告"] -3 RelativeLayout > TextView[text*="跳过"]', ], }, { diff --git a/src/apps/com.ss.android.article.video.ts b/src/apps/com.ss.android.article.video.ts index 719d4d18..18eaa827 100644 --- a/src/apps/com.ss.android.article.video.ts +++ b/src/apps/com.ss.android.article.video.ts @@ -2,16 +2,16 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.ss.android.article.video', - name: `西瓜视频`, + name: '西瓜视频', groups: [ { key: 0, - name: `西瓜视频-关闭青少年模式弹窗`, - activityIds: `com.ixigua.commonui.uikit.dialog.XGAlertDialog`, + name: '西瓜视频-关闭青少年模式弹窗', + activityIds: 'com.ixigua.commonui.uikit.dialog.XGAlertDialog', 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]'], }, ], }); diff --git a/src/apps/com.ss.android.ugc.aweme.ts b/src/apps/com.ss.android.ugc.aweme.ts index 8288a61b..6846b588 100644 --- a/src/apps/com.ss.android.ugc.aweme.ts +++ b/src/apps/com.ss.android.ugc.aweme.ts @@ -2,11 +2,11 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.ss.android.ugc.aweme', - name: `抖音`, + name: '抖音', groups: [ { key: 0, - name: `关闭青少年弹窗`, + name: '关闭青少年弹窗', rules: 'Button[text=`开启青少年模式`] + * > Button[text!=null]', }, ], diff --git a/src/apps/com.taobao.taobao.ts b/src/apps/com.taobao.taobao.ts index 50fdf3e9..54ce6777 100644 --- a/src/apps/com.taobao.taobao.ts +++ b/src/apps/com.taobao.taobao.ts @@ -1,14 +1,14 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ - id: `com.taobao.taobao`, - name: `淘宝`, + id: 'com.taobao.taobao', + name: '淘宝', groups: [ { key: 0, - name: `开屏广告`, - activityIds: `com.taobao.bootimage.activity.BootImageActivity`, - rules: `[id='com.taobao.taobao:id/close']`, // 1687596777612 + name: '开屏广告', + activityIds: 'com.taobao.bootimage.activity.BootImageActivity', + rules: '[id=\'com.taobao.taobao:id/close\']', // 1687596777612 }, ], }); diff --git a/src/apps/com.tencent.androidqqmail.ts b/src/apps/com.tencent.androidqqmail.ts index 30019f94..8cf36f9a 100644 --- a/src/apps/com.tencent.androidqqmail.ts +++ b/src/apps/com.tencent.androidqqmail.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.tencent.androidqqmail', - name: `qq邮箱`, + name: 'qq邮箱', groups: [ { key: 0, diff --git a/src/apps/com.tencent.djcity.ts b/src/apps/com.tencent.djcity.ts index c8f05ed6..c0e22cff 100644 --- a/src/apps/com.tencent.djcity.ts +++ b/src/apps/com.tencent.djcity.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.tencent.djcity', - name: `掌上道聚城`, + name: '掌上道聚城', groups: [ { key: 0, diff --git a/src/apps/com.tencent.karaoke.ts b/src/apps/com.tencent.karaoke.ts index 97ffb780..edb892e0 100644 --- a/src/apps/com.tencent.karaoke.ts +++ b/src/apps/com.tencent.karaoke.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.tencent.karaoke', - name: `全民K歌`, + name: '全民K歌', groups: [ { key: 0, diff --git a/src/apps/com.tencent.mobileqq.ts b/src/apps/com.tencent.mobileqq.ts index 4bfc21b6..f590c458 100644 --- a/src/apps/com.tencent.mobileqq.ts +++ b/src/apps/com.tencent.mobileqq.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.tencent.mobileqq', - name: `QQ`, + name: 'QQ', groups: [ { key: 0, @@ -12,23 +12,26 @@ export default defineAppConfig({ }, { key: 1, - name: `消息页面-顶部广告`, - activityIds: `com.tencent.mobileqq.activity.SplashActivity`, + name: '消息页面-顶部广告', + activityIds: 'com.tencent.mobileqq.activity.SplashActivity', rules: [ - `ImageView[id!=null][desc='关闭'][clickable=true]`, // 1687669217838 + 'ImageView[id!=null][desc=\'关闭\'][clickable=true]', // 1687669217838 ], }, { key: 2, - name: `好友动态-广告卡片`, + name: '好友动态-广告卡片', rules: [ { - activityIds: `com.tencent.qqlive.module.videoreport.inject.dialog.ReportDialog`, - matches: `[clickable=true] > ImageView + TextView[text="关闭此条广告"]`, // 1689050230463 + activityIds: + 'com.tencent.qqlive.module.videoreport.inject.dialog.ReportDialog', + matches: + '[clickable=true] > ImageView + TextView[text="关闭此条广告"]', // 1689050230463 }, { - activityIds: `com.qzone.reborn.feedx.activity.QZoneFriendFeedXActivity`, - matches: `View[desc="广告"] + ImageView[clickable=true]`, // 1689050226722 + activityIds: + 'com.qzone.reborn.feedx.activity.QZoneFriendFeedXActivity', + matches: 'View[desc="广告"] + ImageView[clickable=true]', // 1689050226722 }, ], }, diff --git a/src/apps/com.tencent.mtt.ts b/src/apps/com.tencent.mtt.ts index a4ab8823..d14a57ad 100644 --- a/src/apps/com.tencent.mtt.ts +++ b/src/apps/com.tencent.mtt.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.tencent.mtt', - name: `QQ浏览器`, + name: 'QQ浏览器', groups: [ { key: 0, @@ -12,9 +12,9 @@ export default defineAppConfig({ '@View[id=null] + ImageView + FrameLayout TextView[text=`向上滑动或点击查看`]', { - matches: `@LinearLayout[clickable=true] > TextView[text="跳过"]`, + matches: '@LinearLayout[clickable=true] > TextView[text="跳过"]', 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', ], }, ], diff --git a/src/apps/com.tencent.qqlive.ts b/src/apps/com.tencent.qqlive.ts index becf627b..1c86da49 100644 --- a/src/apps/com.tencent.qqlive.ts +++ b/src/apps/com.tencent.qqlive.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.tencent.qqlive', - name: `腾讯视频`, + name: '腾讯视频', groups: [ { key: 0, diff --git a/src/apps/com.tencent.qqmusic.ts b/src/apps/com.tencent.qqmusic.ts index 33978034..76afca52 100644 --- a/src/apps/com.tencent.qqmusic.ts +++ b/src/apps/com.tencent.qqmusic.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.tencent.qqmusic', - name: `QQ音乐`, + name: 'QQ音乐', groups: [ { key: 0, @@ -18,8 +18,8 @@ export default defineAppConfig({ name: '推荐页-广告卡片', activityIds: 'com.tencent.qqmusic.activity.AppStarterActivity', rules: [ - `@LinearLayout[clickable=true] > TextView[text='广告'] + ImageView`, // 1688045698846 - `TextView[text="广告 | 关闭"][clickable=true]`, + '@LinearLayout[clickable=true] > TextView[text=\'广告\'] + ImageView', // 1688045698846 + 'TextView[text="广告 | 关闭"][clickable=true]', ], }, ], diff --git a/src/apps/com.tencent.qt.sns.ts b/src/apps/com.tencent.qt.sns.ts index 9e291e21..6dee1b95 100644 --- a/src/apps/com.tencent.qt.sns.ts +++ b/src/apps/com.tencent.qt.sns.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.tencent.qt.sns', - name: `掌上穿越火线`, + name: '掌上穿越火线', groups: [ { key: 0, diff --git a/src/apps/com.xiaomi.market.ts b/src/apps/com.xiaomi.market.ts index 22443329..01fc5ce1 100644 --- a/src/apps/com.xiaomi.market.ts +++ b/src/apps/com.xiaomi.market.ts @@ -2,13 +2,13 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.xiaomi.market', - name: `小米应用商店`, + name: '小米应用商店', groups: [ { key: 0, name: '首页悬浮窗广告', activityIds: 'com.xiaomi.market.ui.FloatWebActivity', - rules: "Button[text='关闭']", + rules: 'Button[text=\'关闭\']', }, ], }); diff --git a/src/apps/com.xiaomi.shop.ts b/src/apps/com.xiaomi.shop.ts index 3c58e0dd..e24461b8 100644 --- a/src/apps/com.xiaomi.shop.ts +++ b/src/apps/com.xiaomi.shop.ts @@ -2,15 +2,15 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.xiaomi.shop', - name: `小米商城`, + name: '小米商城', groups: [ { key: 0, - name: `开屏广告`, - activityIds: `com.xiaomi.shop.activity.MainTabActivity`, - rules: `[id="com.xiaomi.shop:id/skip"]`, + name: '开屏广告', + activityIds: 'com.xiaomi.shop.activity.MainTabActivity', + rules: '[id="com.xiaomi.shop:id/skip"]', 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', ], }, ], diff --git a/src/apps/com.ximalaya.ting.lite.ts b/src/apps/com.ximalaya.ting.lite.ts index 937700ad..2dda4ae5 100644 --- a/src/apps/com.ximalaya.ting.lite.ts +++ b/src/apps/com.ximalaya.ting.lite.ts @@ -2,21 +2,21 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.ximalaya.ting.lite', - name: `喜马拉雅极速版`, + name: '喜马拉雅极速版', groups: [ { key: 1, - name: `开屏广告`, - activityIds: `com.ximalaya.ting.android.host.activity.WelComeActivity`, + name: '开屏广告', + activityIds: 'com.ximalaya.ting.android.host.activity.WelComeActivity', 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, name: '首页-推荐-卡片广告', 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\']', }, ], }); diff --git a/src/apps/com.xunlei.downloadprovider.ts b/src/apps/com.xunlei.downloadprovider.ts index dfe9b995..c0fb1ca9 100644 --- a/src/apps/com.xunlei.downloadprovider.ts +++ b/src/apps/com.xunlei.downloadprovider.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.xunlei.downloadprovider', - name: `迅雷`, + name: '迅雷', groups: [ { key: 0, diff --git a/src/apps/com.yek.android.kfc.activitys.ts b/src/apps/com.yek.android.kfc.activitys.ts index 686c6daf..505eba2c 100644 --- a/src/apps/com.yek.android.kfc.activitys.ts +++ b/src/apps/com.yek.android.kfc.activitys.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.yek.android.kfc.activitys', - name: `肯德基`, + name: '肯德基', groups: [ { key: 0, diff --git a/src/apps/com.yipiao.ts b/src/apps/com.yipiao.ts index a20790f8..f2817e05 100644 --- a/src/apps/com.yipiao.ts +++ b/src/apps/com.yipiao.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.yipiao', - name: `智行火车票12306抢票`, + name: '智行火车票12306抢票', groups: [ { key: 0, diff --git a/src/apps/com.zhihu.android.ts b/src/apps/com.zhihu.android.ts index a402294a..dcc9e434 100644 --- a/src/apps/com.zhihu.android.ts +++ b/src/apps/com.zhihu.android.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.zhihu.android', - name: `知乎`, + name: '知乎', groups: [ { key: 0, @@ -48,10 +48,10 @@ export default defineAppConfig({ { key: 5, name: '推荐页广告卡片', - desc: `赚稿费广告卡片,盐选推荐广告,知乎学课堂,汽车广告`, + desc: '赚稿费广告卡片,盐选推荐广告,知乎学课堂,汽车广告', activityIds: 'com.zhihu.android.app.ui.activity.MainActivity', 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`]', '@ImageView[id=`com.zhihu.android:id/menu`] < FrameLayout - * > TextView[text^=`广告`]', // 1687913210243 1686989714786 '@ImageView[id=null][clickable=true] -n TextView[text*=`广告`][index=0]', // 1687418944396 1686924015259 @@ -63,7 +63,7 @@ export default defineAppConfig({ activityIds: 'com.zhihu.android.ContentActivity', rules: [ '@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*=`广告`] +2 Image[id=null]', // 1687338556331 '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, - name: `推荐页-顶部广告`, - activityIds: `com.zhihu.android.app.ui.activity.MainActivity`, + name: '推荐页-顶部广告', + activityIds: 'com.zhihu.android.app.ui.activity.MainActivity', 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 ], }, ], diff --git a/src/apps/com.zidongdianji.ts b/src/apps/com.zidongdianji.ts index ba57fe36..5151a4fe 100644 --- a/src/apps/com.zidongdianji.ts +++ b/src/apps/com.zidongdianji.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'com.zidongdianji', - name: `自动点击器`, + name: '自动点击器', groups: [ { key: 0, diff --git a/src/apps/gov.pianzong.androidnga.ts b/src/apps/gov.pianzong.androidnga.ts index 1dd97aca..8c093c51 100644 --- a/src/apps/gov.pianzong.androidnga.ts +++ b/src/apps/gov.pianzong.androidnga.ts @@ -2,21 +2,21 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'gov.pianzong.androidnga', - name: `NGA玩家社区`, + name: 'NGA玩家社区', groups: [ { key: 0, - name: `开屏广告`, - activityIds: `gov.pianzong.androidnga.activity.LoadingActivity`, - rules: [`[id="gov.pianzong.androidnga:id/iv_tg_ad"]`], - snapshotUrls: `https://gkd-kit.gitee.io/import/12476484`, + name: '开屏广告', + activityIds: 'gov.pianzong.androidnga.activity.LoadingActivity', + rules: ['[id="gov.pianzong.androidnga:id/iv_tg_ad"]'], + snapshotUrls: 'https://gkd-kit.gitee.io/import/12476484', }, { key: 1, - name: `首页-推荐-广告卡片`, - activityIds: `com.donews.nga.activitys.MainActivity`, - rules: [`[id="gov.pianzong.androidnga:id/iv_close_ad"]`], - snapshotUrls: `https://gkd-kit.gitee.io/import/12482727`, + name: '首页-推荐-广告卡片', + activityIds: 'com.donews.nga.activitys.MainActivity', + rules: ['[id="gov.pianzong.androidnga:id/iv_close_ad"]'], + snapshotUrls: 'https://gkd-kit.gitee.io/import/12482727', }, ], }); diff --git a/src/apps/li.songe.gkd.ts b/src/apps/li.songe.gkd.ts index ef1228c1..beff7940 100644 --- a/src/apps/li.songe.gkd.ts +++ b/src/apps/li.songe.gkd.ts @@ -2,11 +2,11 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'li.songe.gkd', - name: `GKD`, + name: 'GKD', groups: [ { key: 0, - name: `GKD-空规则组`, + name: 'GKD-空规则组', }, ], }); diff --git a/src/apps/tv.danmaku.bili.ts b/src/apps/tv.danmaku.bili.ts index 694a7914..c5841d82 100644 --- a/src/apps/tv.danmaku.bili.ts +++ b/src/apps/tv.danmaku.bili.ts @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types'; export default defineAppConfig({ id: 'tv.danmaku.bili', - name: `B站`, + name: 'B站', groups: [ { key: -1, @@ -41,7 +41,7 @@ export default defineAppConfig({ { activityIds: 'com.bilibili.lib.ui.menu', matches: - "TextView[text='广告质量差'||text='推广质量差'][id^='tv.danmaku.bili:id/reason']", // 1691203420529 + 'TextView[text=\'广告质量差\'||text=\'推广质量差\'][id^=\'tv.danmaku.bili:id/reason\']', // 1691203420529 }, ], }, diff --git a/src/config.ts b/src/config.ts index 4467b619..857fa984 100644 --- a/src/config.ts +++ b/src/config.ts @@ -8,7 +8,7 @@ const apps: AppConfig[] = []; for await (const tsFp of walk(process.cwd() + '/src/apps')) { const mod: AppConfigMudule = await import(url.pathToFileURL(tsFp).href); const appConfig = mod.default; - if (path.basename(tsFp, `.ts`) != appConfig.id) { + if (path.basename(tsFp, '.ts') != appConfig.id) { throw new Error( `${picocolors.blue( 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)); const subsConfig: SubscriptionConfig = { id: 0, - name: `默认订阅`, - author: `lisonge`, - supportUri: `https://github.com/gkd-kit/subscription`, + name: '默认订阅', + author: 'lisonge', + supportUri: 'https://github.com/gkd-kit/subscription', apps, }; diff --git a/src/file.ts b/src/file.ts index cef6a692..0ab2aa10 100644 --- a/src/file.ts +++ b/src/file.ts @@ -15,24 +15,24 @@ const iArrayToArray = (array: IArray = []): T[] => { }; const sortKeys: (keyof SubscriptionConfig)[] = [ - `id`, - `name`, - `version`, - `author`, + 'id', + 'name', + 'version', + 'author', 'supportUri', - `updateUrl`, - `apps`, + 'updateUrl', + 'apps', ]; export const writeConfig = async (fp: string, config: SubscriptionConfig) => { const newConfig: SubscriptionConfig = { ...config }; const oldConfig: SubscriptionConfig = JSON.parse( - await fs.readFile(fp, 'utf-8').catch(() => `{}`), + await fs.readFile(fp, 'utf-8').catch(() => '{}'), ); newConfig.version = oldConfig.version ?? 0; if (_.isEqual(newConfig, oldConfig)) { - console.log([oldConfig.name, `nothing changed, skip`]); + console.log([oldConfig.name, 'nothing changed, skip']); return; } newConfig.version++; @@ -50,18 +50,18 @@ export const writeConfig = async (fp: string, config: SubscriptionConfig) => { ); await fs.writeFile(fp, buffer); - const newPkg = { ...selfPkg, version: `0.0.` + newConfig.version }; + const newPkg = { ...selfPkg, version: '0.0.' + newConfig.version }; await fs.writeFile( process.cwd() + '/package.json', - JSON.stringify(newPkg, void 0, 2) + `\n`, + JSON.stringify(newPkg, void 0, 2) + '\n', ); await updateReadMeMd(newConfig); console.log({ - mtime: dayjs().format(`HH:mm:ss`), + mtime: dayjs().format('HH:mm:ss'), name: newConfig.name, - size: (buffer.length / 1024).toFixed(3) + `KB`, + size: (buffer.length / 1024).toFixed(3) + 'KB', version: newConfig.version, }); }; @@ -95,7 +95,7 @@ export const checkConfig = (newConfig: SubscriptionConfig) => { groupName: g.name, groupKey: g.key, }); - throw new Error(`invalid duplicated group key`); + throw new Error('invalid duplicated group key'); } keys.add(g.key); }); @@ -120,7 +120,7 @@ export const checkConfig = (newConfig: SubscriptionConfig) => { parseSelector(selector); } catch (e) { console.error({ - message: `invalid selector syntax`, + message: 'invalid selector syntax', appId: app.id, groupKey: g.key, selector, @@ -137,7 +137,7 @@ export const checkConfig = (newConfig: SubscriptionConfig) => { sortKeys, 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) => { const groupNameMdText = `- ${group.name}` + - (group.desc ? ` - ${group.desc}` : ``).trimEnd(); + (group.desc ? ` - ${group.desc}` : '').trimEnd(); const exampleUrls: string[] = []; exampleUrls.push(...iArrayToArray(group.exampleUrls)); @@ -170,7 +170,7 @@ export const updateReadMeMd = async (newConfig: SubscriptionConfig) => { return ` - [示例-${i}](${u})`; } }) - .join(`\n`) + .join('\n') .trimEnd(); const snapshotUrls: string[] = []; @@ -191,28 +191,28 @@ export const updateReadMeMd = async (newConfig: SubscriptionConfig) => { return ` - [快照-${i}](${u})`; } }) - .join(`\n`); + .join('\n'); return [groupNameMdText, exampleMdText, snapshotMdText] .filter((s) => s) - .join(`\n`) + .join('\n') .trimEnd(); }) - .join(`\n`) + .join('\n') .trimEnd(); - return [appMdText, groupMdText].join(`\n`).trimEnd(); + return [appMdText, groupMdText].join('\n').trimEnd(); }) - .join(`\n\n`) + .join('\n\n') .trimEnd(); const readMeMdText = mdTemplate - .replace(`--APP_SIZE--`, newConfig.apps.length.toString()) + .replace('--APP_SIZE--', newConfig.apps.length.toString()) .replace( - `--GROUP_SIZE--`, + '--GROUP_SIZE--', newConfig.apps .reduce((p, c) => p + (c.groups?.length || 0), 0) .toString(), ) - .replace(`--APP_LIST--`, appListText); + .replace('--APP_LIST--', appListText); await fs.writeFile(process.cwd() + '/README.md', readMeMdText); };