将 Google CDN 替换为国内镜像 v3

Latest Version

Version
0.10.23
Update
February 13, 2023
Size
110KiB
Developer
justjavac.com
Category
Users
10,000+
Rating
4.52941 ★
Manifest Version
3
Web Store Status
Languages Support
中文 (简体)
See more
Permissions
DeclarativeNetRequest
DeclarativeNetRequestWithHostAccess
DeclarativeNetRequestFeedback
See more

Replace Google CDN Extension

> 由于众所周知的原因,只需替换一个域名就可以继续使用Google提供的前端公共库了。
> 同样,通过script标记引用这些资源,让网站访问速度瞬间提速吧骚年!

很多网站,尤其是国外网站,为了加快网站的速度,都是用了 Google 的 CDN。

但是在天朝,由于某些原因,导致全球最快的 CDN 变成了全球最慢的。

于是,我写了这个插件,将 Google 的 CDN 替换成国内的。

本来我使用的是 360 提供的。经网友提醒 360 的不支持 https,于是改成中科大的。
Read more

Source Manifest.json

{"update_url": "https://clients2.google.com/service/update2/crx", "name": "Replace Google CDN", "version": "0.10.23", "manifest_version": 3, "icons": { "128": "icons/128.png" }, "description": "\u5c06 Google CDN \u66ff\u6362\u4e3a\u56fd\u5185\u955c\u50cf v3", "background": { "service_worker": "js/background.js", "type": "module" }, "permissions": [ "declarativeNetRequest", "declarativeNetRequestWithHostAccess", "declarativeNetRequestFeedback" ], "host_permissions": [""], "declarative_net_request": { "rule_resources": [ { "id": "ruleset_redirect_main", "enabled": true, "path": "rules/rules_redirect_main.json" }, { "id": "ruleset_redirect_main_extra", "enabled": true, "path": "rules/rules_redirect_main_extra.json" }, { "id": "ruleset_remove_content_security_policy_header", "enabled": true, "path": "rules/rules_remove_content_security_policy_header.json" }, { "id": "ruleset_domain_replace", "enabled": false, "path": "rules/rules_domain_replace.json" } ] }, "content_security_policy": { "extension_pages": "default-src 'self';script-src 'self' 'wasm-unsafe-eval' ;object-src 'self'; style-src 'self' 'unsafe-inline' ; connect-src https://justjavac.com https://justjavac.github.io https://*.justjavac.com/ https://*.jingjingxyk.com https://jingjingxyk.github.io http://localhost https://raw.githubusercontent.com https://github.com https://gitee.com https://gitcode.net;", "sandbox": "sandbox allow-scripts allow-popups; script-src 'unsafe-inline' 'unsafe-eval' " }, "options_ui": { "page": "options_ui/index.html", "open_in_tab": true }, "sandbox": { "pages": ["sandbox/index.html"] }, "action": { "default_title": "Replace Google CDN" }, "author": "https://github.com/justjavac", "homepage_url": "https://github.com/justjavac/ReplaceGoogleCDN"}
Read more