### GKD Global Rule Example (JSON5) Source: https://gkd.li/guide/subscription An example of a global rule in GKD, applicable across different applications. This rule defines conditions for actions like skipping splash ads, including matching text, visibility, and action limits. ```json5 { key: 0, name: '开屏广告', fastQuery: true, matchTime: 10000, actionMaximum: 1, resetMatch: 'app', rules: [ { key: 0, matches: '[text*="跳过"][text.length<10][visibleToUser=true]', }, ], } ``` -------------------------------- ### GKD App Rule Example (JSON5) Source: https://gkd.li/guide/subscription An example of an app-specific rule for GKD, used to target elements within a particular application. This rule is derived from a snapshot and specifies an ID, name, and a group with matching rules. ```json5 { id: 'com.zhihu.android', name: '知乎', groups: [ { key: 0, name: '开屏广告', rules: { matches: 'TextView[id="com.zhihu.android:id/btn_skip"]' }, snapshotUrls: ['https://i.gkd.li/i/13070251'], }, ], } ``` -------------------------------- ### GKD App Rule Group Example (JSON5) Source: https://gkd.li/guide/subscription Demonstrates how to define an app rule group in GKD, which can contain multiple rules for a specific app's functionality, like handling pop-up dialogs. It includes fields for a key, name, and a list of rules with match conditions and snapshot URLs. ```json5 { key: 1, name: '全屏广告-会员活动弹窗', rules: [ { key: 0, fastQuery: true, activityIds: 'com.blued.android.core.ui.TransparentActivity', matches: '[vid="img_close"]', snapshotUrls: 'https://i.gkd.li/i/14310618', }, ], } ``` -------------------------------- ### Combine Multiple Selectors Source: https://gkd.li/guide/example A complex selector combining multiple relationships for advanced node targeting. ```selector ImageView < FrameLayout 4 FrameLayout[index=0] +2 FrameLayout > @TextView[index=parent.childCount.minus(1)] < ImageView ViewGroup[vid="avatar_layout"] >2 ImageView FrameLayout[vid="content_layout"] >n ImageView[vid="search_icon"] ``` -------------------------------- ### Find Descendants Within Parent Source: https://gkd.li/guide/example Selectors to search for descendant nodes within a specified parent's scope. ```selector @[text="直播"] < @[text="直播"] <