Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yanglee2421/rest-api
https://github.com/yanglee2421/rest-api
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/yanglee2421/rest-api
- Owner: yanglee2421
- License: mit
- Created: 2023-08-07T16:22:11.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-14T06:56:26.000Z (about 1 month ago)
- Last Synced: 2024-12-14T07:27:15.660Z (about 1 month ago)
- Language: TypeScript
- Size: 2.31 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 为 ADG 和 UBO 收集的一些拦截规则
![version](https://img.shields.io/badge/version-0.0.1-blue)
![npm](https://img.shields.io/badge/yan-v1.2.19-orange)
![dependencies](https://img.shields.io/badge/dependencies-express-brightgreen)
![developer](https://img.shields.io/badge/developer-YangLee-f39f37)## 订阅地址:
- [本规则](https://raw.githubusercontent.com/Swz0321/AdGuard/master/public/index.txt)
- [AdGuard 中文](https://raw.githubusercontent.com/AdguardTeam/FiltersRegistry/master/filters/filter_224_Chinese/filter.txt)
- [AdGuard 移动](https://raw.githubusercontent.com/AdguardTeam/FiltersRegistry/master/filters/filter_11_Mobile/filter.txt)## 从代码仓库下载单个文件的 URL
- github 中:raw.gitubusercontent.com/用户名/仓库名/分支名/文件路径
- gitee.com 中:gitee.com/用户名/仓库名/raw/分支名/文件路径
## 规则语法:
### 转义字符
| 字符 | 含义 |
| -------- | -------------------------------------------- |
| `*` | 任意字符 |
| `\| \|` | https:// 或者 http:// |
| `/route` | 该路径下的所有文件(不包含子文件夹中的文件) |
| `^` | `/` 或者 `:`也用来分隔域名结尾和`$` |
| `$` | 内容修饰符 |### 内容修饰符用法
| 用法 | 含义 |
| --------------------- | ---------------------- |
| `$image` | 拦截图片 |
| `$~image` | 除了图片都拦截 |
| `$script` | 拦截 script 标签 |
| `$~script` | 除了 script 标签都拦截 |
| `$3p` | 拦截第三方请求 |
| `$domain=指定域名` | 拦截来自指定域名的请求 |
| `$denyallow=指定域名` | 放行来自指定域名的请求 |### 元素拦截
- 语法:域名`##`css 选择器
```
baidu.com##div
```- 特殊伪类:`:contains()`
```css
/*
配匹`innerText`中含有指定内容的元素,建议配上子元素选择器和正则一起用
*/
div > div:contains(/要配匹的字符/)
```