Due to some well-known reasons, the foreign CDN hosting method adopted by many open source JS libraries is not as fast as expected at home. So u.sb specially created this pro bono project, hosting all CDNJS’s open source JS libraries and replacing Google Fonts, Ajax and Gravatar.
1. CDNJS open source JS library
The method we adopt is to synchronize the Github of CDNJS at a fixed time every day.
All JS/CSS libraries can find the links you need here.
https://cdnjs.loli.net/ajax/libs/
If you use cdnjs.com, you only need to replace thecdnjs.cloudflare.com
Forcdnjs.loli.net
Can be done, such as
Replace with
The API development documentation for CDNJS can be found here.
2 、 Google Fonts
The method we adopt is omnipotent Nginx anti-substitution + keyword substitution.
When using it, you only need to replacefonts.googleapis.com
Forfonts.loli.net
Can be done, such as
Replace with
If you need Material icons, put the
Replace with
If you need Early Access, put the
@import url(https://fonts.googleapis.com/earlyaccess/notosanskannada.css);
Replace with
@import url(https://fonts.loli.net/earlyaccess/notosanskannada.css);
If you need to download a single font, you only need to set thefonts.gstatic.com
Replace withgstatic.loli.net
Orthemes.googleusercontent.com
Replace withthemes.loli.net
It can be done.
such as
https://fonts.gstatic.com/s/opensans/v14/K88pR3goAWT7BTt32Z01mxJtnKITppOI_IvcXXDNrsc.woff2
Replace with
https://gstatic.loli.net/s/opensans/v14/K88pR3goAWT7BTt32Z01mxJtnKITppOI_IvcXXDNrsc.woff2
Or
https://themes.googleusercontent.com/static/fonts/anonymouspro/v3/Zhfjj_gat3waL4JSju74E-V_5zh5b-_HiooIRUBwn1A.ttf
Replace with
https://themes.loli.net/static/fonts/anonymouspro/v3/Zhfjj_gat3waL4JSju74E-V_5zh5b-_HiooIRUBwn1A.ttf
The API document of Google Fonts, please touch here.
3. Google front-end common library
The method is the same as above, replace it directly.ajax.googleapis.com
Forajax.loli.net
Can be done, such as
Replace with
The Google front-end library API development documentation can be found here
4. Gravatar avatar
The method is the same as above, directly replace*.gravatar.com
Forgravatar.loli.net
Can be done, such as
https://secure.gravatar.com/avatar/8406d089bc81b664a2610b8d214c1428
Replace with
https://gravatar.loli.net/avatar/8406d089bc81b664a2610b8d214c1428
5. Sponsors
Domestic and foreign CDN, GeoDNS, domain name, SSL certificate and other basic services are sponsored by Riven Cloud
6. Accelerated domain name list
The domain names of all domestic acceleration services are listed below. You only need to modify the original domain name in the program.
Original domain name | Accelerated domain name | Manufacturing method |
---|---|---|
cdnjs.cloudflare.com | cdnjs.loli.net | Daily synchronization Github |
ajax.googleapis.com | ajax.loli.net | Nginx reverse generation |
fonts.googleapis.com | fonts.loli.net | Nginx reverse generation |
fonts.gstatic.com | gstatic.loli.net | Nginx reverse generation |
themes.googleusercontent.com | themes.loli.net | Nginx reverse generation |
secure.gravatar.com | gravatar.loli.net | Nginx reverse generation |
Note: individual domestic network environment may not be able to use this service, there is no way to solve this problem for the time being, please check or change the operator.
via u.sb