Skip to content

Commit

Permalink
Feature delete invalid url (#205)
Browse files Browse the repository at this point in the history
* delete invalid option url

* update describe

* format code

* update README.md

* update README.md

* update README.md

* update README.md

* format code

* update net-detect.md

* update README.md
  • Loading branch information
jingjingxyk authored Jul 17, 2024
1 parent ade4a2c commit fb40125
Show file tree
Hide file tree
Showing 27 changed files with 302 additions and 1,543 deletions.
22 changes: 11 additions & 11 deletions CHANGELOG-v2-x.x.x.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# CHANGELOG for v2
# v2

## CHANGELOG for v2 0.10.17 [2023-12-05 00:49:00 +0800]
## v2 0.10.17 [2023-12-05 00:49:00 +0800]

> 1. 格式化代码
1. 格式化代码

## CHANGELOG for v2 0.10.16 [2023-02-09 13:01:00 +0800]
## v2 0.10.16 [2023-02-09 13:01:00 +0800]

> 1. v2 版本 修改 高级用法分离出去,精简默认代码
> 1. v2 版本 升级 到 0.10.16
1. v2 版本 修改 高级用法分离出去,精简默认代码
2. v2 版本 升级 到 0.10.16

## CHANGELOG for v2 0.10.15 [2023-02-06 23:49:00 +0800]
## v2 0.10.15 [2023-02-06 23:49:00 +0800]

> 1. v2 版本 修改 `fonts.gstatic.com``fonts.gstatic.com` 重定向地址
> 1. v2 版本 新增 `developer.android.com` 地址重定向
> 1. v2 版本 新增 `source.android.com` 地址重定向
> 1. v2 版本 升级 到 0.10.15
1. v2 版本 修改 `fonts.gstatic.com``fonts.gstatic.com` 重定向地址
2. v2 版本 新增 `developer.android.com` 地址重定向
3. v2 版本 新增 `source.android.com` 地址重定向
4. v2 版本 升级 到 0.10.15
342 changes: 187 additions & 155 deletions CHANGELOG-v3-x.x.x.md

Large diffs are not rendered by default.

36 changes: 19 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,28 @@
> - [浏览器 V2 API](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webRequest)
> - [浏览器 V3 API](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/declarativeNetRequest)
>
> 默认未启用的规则, 如需启用请到扩展选项页自行打开
> 默认未启用的规则, (双击扩展图标,进入扩展选项页面,可调整替换地址)
此插件/扩展可以将以下的 CDN 资源替换为国内的:

1. `ajax.googleapis.com` - 前端公共库,替换为 `ajax.loli.net`
1. `fonts.googleapis.com` - 免费字体库,替换为 `fonts.googleapis.cn`
1. `themes.googleusercontent.com` - fonts 有时会使用到这个里面的资源,替换为`themes.loli.net`
1. `fonts.gstatic.com` - 免费字体库,替换为 `fonts.gstatic.cn`
1. `www.google.com/recaptcha` - Google 图像验证库,替换为`www.recaptcha.net/recaptcha`
1. `secure.gravatar.com` - gravatar 头像,替换为 `gravatar.loli.net`
1. `maxcdn.bootstrapcdn.com/bootstrap` - bootstrap 框架使用的 CDN,替换为`lib.baomitu.com/twitter-bootstrap/`
1. `code.jquery.com/jquery-(version)(suffix)` - jquery 框架使用的 CDN,替换为`https://fastly.jsdelivr.net/npm/jquery@$verson/dist/jquery$suffix`
1. `cdnjs.cloudflare.com` - 替换为 `cdnjs.loli.net` 默认未启用, 如需启用请到扩展选项页自行打开
1. `cdn.jsdelivr.net` - 替换为 `fastly.jsdelivr.net`
1. `developers.google.com` - 替换为 `developers.google.cn` 默认未启用, 如需启用请到扩展选项页自行打开
1. `developer.android.com` - 替换为 `developer.android.google.cn` 默认未启用, 如需启用请到扩展选项页自行打开
1. `source.android.com` - 替换为 `source.android.google.cn` 默认未启用, 如需启用请到扩展选项页自行打开
1. `www.gstatic.com` - 替换为 `www.gstatic.cn` 默认未启用, 如需启用请到扩展选项页自行打开
1. `lh3.googleusercontent.com` 默认未启用, 如需启用请到扩展选项页自行打开
1. `cdn.sstatic.net`- 替换为 `sstatic.net` 默认未启用,如需启用请到扩展选项页自行打开
| 序号 | 原地址 | 替换后的地址 | 是否启用 | 简述 |
|----|--------------------------------------------|---------------------------------------------------------------------|------|---------------------|
| 1 | `ajax.googleapis.com` | `ajax.loli.net` || 前端公共库 |
| 2 | `fonts.googleapis.com` | `fonts.googleapis.cn` || 免费字体库 |
| 3 | `themes.googleusercontent.com` | `themes.loli.net` || fonts 资源引用 |
| 4 | `fonts.gstatic.com` | `fonts.googleapis.cn` || 免费字体库 |
| 5 | `www.google.com/recaptcha` | `www.recaptcha.net/recaptcha` || Google 图像验证库 |
| 6 | `secure.gravatar.com` | `gravatar.loli.net` || gravatar 头像 |
| 7 | `maxcdn.bootstrapcdn.com/bootstrap` | `lib.baomitu.com/twitter-bootstrap/` || bootstrap 框架使用的 CDN |
| 8 | `code.jquery.com/jquery-(version)(suffix)` | `https://fastly.jsdelivr.net/npm/jquery@$verson/dist/jquery$suffix` || jquery 框架使用的 CDN |
| 9 | `cdnjs.cloudflare.com` | `cdnjs.loli.net` | - | - |
| 10 | `cdn.jsdelivr.net` | `fastly.jsdelivr.net` | - | - |
| 11 | `developers.google.com` | `developers.google.cn` | - | - |
| 12 | `developer.android.com` | `developer.android.google.cn` | - | - |
| 13 | `source.android.com` | `source.android.google.cn` | - | - |
| 14 | `www.gstatic.com` | `www.gstatic.cn` | - | - |
| 15 | `lh3.googleusercontent.com` | `source.android.google.cn` | - | - |
| 16 | `cdn.sstatic.net` | `sstatic.net` | - | - |

## 扩展选项页使用简述

Expand Down
11 changes: 0 additions & 11 deletions experimental-features/v3/rules/example/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
# 本目录下文件 规则例子

## 规则编写的参考文档

1. [图片镜像缓存服务—防盗链图片、imgur 等国内无法访问图片的解决方案](https://funletu.com/10538/.html)

```text
# 使用
https://github.com/justjavac/ReplaceGoogleCDN/blob/master/experimental-features/v3/rules/example/imgur.com-stackoverflow.com.json?raw=true
```
Original file line number Diff line number Diff line change
Expand Up @@ -92,70 +92,6 @@
"media",
"websocket",

"other"
]
}
},

{
"id": 4,
"priority": 100,
"action": {
"type": "redirect",
"redirect": {
"regexSubstitution": "https://pic1.xuehuaimg.com/proxy/\\1"
}
},
"condition": {
"regexFilter": "^https?://(.*?)",
"requestDomains": ["imgur.com"],
"initiatorDomains": ["stackoverflow.com"],
"resourceTypes": [
"main_frame",
"sub_frame",
"stylesheet",
"script",
"image",
"font",
"object",
"xmlhttprequest",
"ping",
"csp_report",
"media",
"websocket",

"other"
]
}
},

{
"id": 5,
"priority": 100,
"action": {
"type": "redirect",
"redirect": {
"regexSubstitution": "https://search.pstatic.net/common?src=\\1"
}
},
"condition": {
"regexFilter": "(.*?)",
"requestDomains": ["imgur.com"],
"initiatorDomains": ["stackoverflow.com"],
"resourceTypes": [
"main_frame",
"sub_frame",
"stylesheet",
"script",
"image",
"font",
"object",
"xmlhttprequest",
"ping",
"csp_report",
"media",
"websocket",

"other"
]
}
Expand Down

This file was deleted.

Loading

0 comments on commit fb40125

Please sign in to comment.