chore: sync

This commit is contained in:
lisonge
2023-08-29 11:28:27 +08:00
parent 2aabc163ac
commit e885877913
6 changed files with 50 additions and 22 deletions

29
dist/gkd.json vendored
View File

@@ -1,7 +1,7 @@
{
"id": 0,
"name": "默认订阅",
"version": 30,
"version": 31,
"author": "lisonge",
"supportUrl": "https://github.com/gkd-kit/subscription",
"apps": [
@@ -16,6 +16,7 @@
"miuix.appcompat.app.m"
],
"rules": [
"@TextView[text^='跳过'] + LinearLayout TextView[text*=\"跳转\"]",
"[text^='跳过'] + * >2 TextView[text*='跳转']"
]
},
@@ -30,19 +31,6 @@
}
]
},
{
"id": "air.tv.douyu.android",
"groups": [
{
"key": 0,
"name": "快影-开屏广告",
"activityIds": "com.kwai.videoeditor.activity.splash.InnerVideoSplashActivity",
"rules": [
"Button[text=\"跳过\"]"
]
}
]
},
{
"id": "cmb.pb",
"groups": [
@@ -591,6 +579,19 @@
}
]
},
{
"id": "com.kwai.videoeditor",
"groups": [
{
"key": 0,
"name": "快影-开屏广告",
"activityIds": "com.kwai.videoeditor.activity.splash.InnerVideoSplashActivity",
"rules": [
"Button[text=\"跳过\"]"
]
}
]
},
{
"id": "com.mihoyo.hyperion",
"groups": [

View File

@@ -1,7 +1,7 @@
{
"name": "@gkd-kit/subscription",
"type": "module",
"version": "0.0.30",
"version": "0.0.31",
"main": "./dist/gkd.json",
"unpkg": "./dist/gkd.json",
"jsdelivr": "./dist/gkd.json",
@@ -12,7 +12,7 @@
"build": "tsx ./src/main.ts"
},
"devDependencies": {
"@gkd-kit/selector": "0.0.10",
"@gkd-kit/selector": "0.0.11",
"@types/lodash": "^4.14.195",
"@types/node": "^20.4.2",
"@types/prettier": "2.7.3",
@@ -38,5 +38,8 @@
},
"volta": {
"node": "20.5.0"
},
"dependencies": {
"picocolors": "1.0.0"
}
}

17
pnpm-lock.yaml generated
View File

@@ -4,10 +4,15 @@ settings:
autoInstallPeers: false
excludeLinksFromLockfile: false
dependencies:
picocolors:
specifier: 1.0.0
version: 1.0.0
devDependencies:
'@gkd-kit/selector':
specifier: 0.0.10
version: 0.0.10
specifier: 0.0.11
version: 0.0.11
'@types/lodash':
specifier: ^4.14.195
version: 4.14.195
@@ -266,8 +271,8 @@ packages:
dev: true
optional: true
/@gkd-kit/selector@0.0.10:
resolution: {integrity: sha512-k9kE8ZrqJ6CoNSXqjlxZ0EbdwSsNXwkQJ1TwZ33Yxh1ujITyOGJk0D+gwaNzOCj6qRfAomdTXPXXk44YVVWqCA==}
/@gkd-kit/selector@0.0.11:
resolution: {integrity: sha512-WqerYbOBOnVQkDgiqhjSFWfZZdJwPNiM1faFFVHrUCL0cwtpi0QZa0MEknd66i82kTs2bBwqmD8y21syNZaNDg==}
dev: true
/@tootallnate/once@1.1.2:
@@ -862,6 +867,10 @@ packages:
through: 2.3.8
dev: true
/picocolors@1.0.0:
resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==}
dev: false
/prelude-ls@1.1.2:
resolution: {integrity: sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==}
engines: {node: '>= 0.8.0'}

View File

@@ -11,6 +11,8 @@ export default <AppConfig>{
`miuix.appcompat.app.m`,
],
rules: [
// https://gkd-kit.gitee.io/import/38517192/50c858ee-d331-4d5a-b5db-5eb17323c5ff
`@TextView[text^='跳过'] + LinearLayout TextView[text*="跳转"]`,
`[text^='跳过'] + * >2 TextView[text*='跳转']`, // 1686970245243, 1686970188866
],
},

View File

@@ -1,12 +1,13 @@
import type { AppConfig } from '../types';
export default <AppConfig>{
id: 'air.tv.douyu.android',
id: 'com.kwai.videoeditor',
groups: [
{
key: 0,
name: `快影-开屏广告`,
activityIds: `com.kwai.videoeditor.activity.splash.InnerVideoSplashActivity`,
// https://gkd-kit.gitee.io/import/38517192/d12c3b08-8233-4584-b2b9-595ebb4ce665
rules: [`Button[text="跳过"]`],
},
],

View File

@@ -1,11 +1,23 @@
import { relativePath, walk, writeConfig } from './file';
import { AppConfig, AppConfigMudule } from './types';
import url from 'node:url';
import path from 'node:path';
import picocolors from 'picocolors';
const apps: AppConfig[] = [];
for await (const tsFp of walk(relativePath('./apps'))) {
const mod: AppConfigMudule = await import(url.pathToFileURL(tsFp).href);
apps.push(mod.default);
const appConfig = mod.default;
if (path.basename(tsFp, `.ts`) != appConfig.id) {
throw new Error(
`${picocolors.blue(
tsFp,
)} file basename is not equal to its app id ${picocolors.blue(
appConfig.id,
)} `,
);
}
apps.push(appConfig);
}
// a,b,c,d