All Projects → justjavac → Replacegooglecdn

justjavac / Replacegooglecdn

Licence: gpl-3.0
♋ 一个 Chrome 插件:将 Google CDN 替换为国内的。

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Replacegooglecdn

Jsearch
jSearch(聚搜) 是一款专注内容的chrome搜索扩展,一次搜索聚合多平台内容。
Stars: ✭ 193 (-91.96%)
Mutual labels:  google, chrome-extension, chrome
Darkness
Dark Themes for Popular Websites
Stars: ✭ 467 (-80.54%)
Mutual labels:  google, chrome-extension, chrome
Skip Ad
A simple lightweight Chrome extension that automatically skips YouTube Ads.
Stars: ✭ 54 (-97.75%)
Mutual labels:  google, chrome-extension, chrome
React Chrome Extension
Chrome Extension boilerplate with ReactJS and vanilla JS examples
Stars: ✭ 134 (-94.42%)
Mutual labels:  chrome-extension, chrome
Editchromethemes
A guide to editing Chrome themes
Stars: ✭ 118 (-95.08%)
Mutual labels:  chrome-extension, chrome
Span Tree
🌳 Tree for GitLab
Stars: ✭ 123 (-94.87%)
Mutual labels:  chrome-extension, chrome
T Rex Runner
the t-rex runner game extracted from chromium
Stars: ✭ 1,580 (-34.17%)
Mutual labels:  google, chrome
Synology Download Manager
An open source browser extension for adding/managing download tasks to your Synology DiskStation.
Stars: ✭ 138 (-94.25%)
Mutual labels:  chrome-extension, chrome
Whatsapp Bulk Sender
Send bulk messages right from your WhatsApp Android Client or WhatsApp Web
Stars: ✭ 135 (-94.37%)
Mutual labels:  chrome-extension, chrome
Youtube Projects
This repository contains all the code I use in my YouTube tutorials.
Stars: ✭ 144 (-94%)
Mutual labels:  google, chrome-extension
Awesome Chrome Extension Boilerplate
Use react + typescript + webpack to enhance your chrome extension development experience
Stars: ✭ 146 (-93.92%)
Mutual labels:  chrome-extension, chrome
Vertical Tabs Chrome Extension
A chrome extension that presents your tabs vertically. Problem solved.
Stars: ✭ 117 (-95.12%)
Mutual labels:  chrome-extension, chrome
Web Extension Starter
Typescript, React, Redux, Styled-Component and Webpack based sample extension boilerplate. Runs on Chrome and Firefox. Sample chrome extension.
Stars: ✭ 115 (-95.21%)
Mutual labels:  chrome-extension, chrome
Urql Devtools
A tool for monitoring and debugging urql during development
Stars: ✭ 131 (-94.54%)
Mutual labels:  chrome-extension, chrome
Ctool
程序开发常用工具 chrome 扩展
Stars: ✭ 111 (-95.37%)
Mutual labels:  chrome-extension, chrome
Surfingkeys Conf
A SurfingKeys configuration which adds 130+ key mappings for 20+ sites & OmniBar search suggestions for 50+ sites
Stars: ✭ 137 (-94.29%)
Mutual labels:  chrome-extension, chrome
Notes
📔 Linux、MySQL、Nginx、PHP、Git、Shell 等笔记
Stars: ✭ 1,835 (-23.54%)
Mutual labels:  chrome-extension, chrome
React Rewind
Time Travel Debugger for React useReducer
Stars: ✭ 159 (-93.37%)
Mutual labels:  chrome-extension, chrome
Chrome Extensions Reloader
A chrome extension for reloading unpacked extensions
Stars: ✭ 154 (-93.58%)
Mutual labels:  chrome-extension, chrome
Wikipediap2p
WikipediaP2P.org Chrome Extension
Stars: ✭ 105 (-95.62%)
Mutual labels:  chrome-extension, chrome

Replace Google CDN

Chrome Web Store

将 Google CDN 替换为国内的。

缘起

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

很多网站,尤其是国外网站,为了加快网站的速度,都使用了 Google 的 CDN。 但是在天朝,由于某些原因,导致全球最快的 CDN 变成了全球最慢的。

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

原理

此插件/扩展可以将以下的 cdn 资源替换为国内的:

  1. ajax.googleapis.com - 前端公共库,替换为 ajax.loli.net
  2. fonts.googleapis.com - 免费字体库,替换为 fonts.loli.net
  3. themes.googleusercontent.com - fonts 有时会使用到这个里面的资源,替换为 themes.loli.net
  4. fonts.gstatic.com - 免费字体库,替换为 gstatic.loli.net
  5. www.google.com/recaptcha - Google 图像验证库,替换为 www.recaptcha.net/recaptcha
  6. secure.gravatar.com - gravatar 头像,替换为 gravatar.loli.net
  7. maxcdn.bootstrapcdn.com/bootstrap - bootstrap 框架使用的 CDN,替换为 cdn.bootcdn.net/ajax/libs/twitter-bootstrap

效果

安装扩展/插件后访问 https://stackoverflow.com/questions 页面:

第一行是 jquery.min.js 的原始请求 https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js,被拦截并替换,返回的状态码为 307 Internal Redirect,耗时 26ms。第三行是 jquery.min.js 被替换后的请求,33kB,耗时 95ms。

下表是各种资源的网络请求对比(以替换后的速度为基准 100%):

资源 来源 尺寸(kB) 时间(ms) 速度(B/ms) 百分比
jquery.min.js ajax.googleapis.com 0 26 - -
stub.en.js cdn.sstatic.net 18.0 293 61.4 18%
jquery.min.js ajax.loli.net ⚡️ 33.1 95 348.4 100%
clc.min.js cdn.sstatic.net 4.2 399 10.5 30%
full.en.js cdn.sstatic.net 99.6 534 186.5 54%
gpt.js securepubads.g.doubleclick.net 21.3 85 250.6 72%
analytics.js google-analytics.com 19.6 79 248.1 71%
quant.js secure.quantserve.com 9.1 420 21.7 62%
beacon.js sb.scorecardresearch.com 1.8 73 24.7 71%
integrator.js adservice.google.com 🐌 0.3 87 3.4 1%
markup.js clc.stackoverflow.com 🐌 9.2 252 36.5 10%
osd.js googletagservices.com 28.1 90 312.2 89%
rules-p-c1rF4kxgLUzNc.js rules.quantcount.com 🐌 0.4 96 4.2 1%
keyboard-shortcuts.en.js cdn.sstatic.net 7.3 75 97.3 27.9%

安装

在线安装

手动安装

Chrome 安装方法(Google 被墙了上不去):

  1. 下载 ReplaceGoogleCDN 然后解压,找到 extension 子目录
  2. 打开 Chrome,输入: chrome://extensions/
  3. 勾选 Developer Mode
  4. 选择 Load unpacked extension... 然后定位到刚才解压的文件夹里面的 chrome 目录,确定
  5. 这就安装好了,去掉 Developer Mode 勾选。
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].