Add Fonts lazyload

This commit is contained in:
186526 2020-12-25 21:13:43 +08:00
parent 2772e5801e
commit c598002135
Signed by untrusted user: 186526
GPG Key ID: C7EB1E6B8CC5E51D
3 changed files with 27 additions and 2161 deletions

View File

@ -16,6 +16,7 @@ window.addEventListener("load", () => {
});
window.addEventListener('load', () => {
if ("serviceWorker" in navigator) { navigator.serviceWorker.register("/sw.js", { scope: "/" }).then((function (e) { })).catch((function (e) { })); let e = !1; navigator.serviceWorker.addEventListener("controllerchange", () => { e || (e = !0, alert("正在更新Service Worker……"), window.location.reload()) }) }
if (/HeadlessChrome/.test(window.navigator.userAgent)) {return;}
if(!window.dataLayer) {
let d=document,a = d.createElement("script");
a.async = true;

View File

@ -1,49 +1,8 @@
/*
* See: https://fonts.google.com/license/googlerestricted
*/
/* cyrillic */
@font-face {
font-family: 'Google Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/googlesans/v27/4UaGrENHsxJlGDuGo1OIlL3Kwp5MKg.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
font-family: 'Google Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/googlesans/v27/4UaGrENHsxJlGDuGo1OIlL3Nwp5MKg.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Google Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/googlesans/v27/4UaGrENHsxJlGDuGo1OIlL3Bwp5MKg.woff2) format('woff2');
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Google Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/googlesans/v27/4UaGrENHsxJlGDuGo1OIlL3Awp5MKg.woff2) format('woff2');
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Google Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://fonts.gstatic.com/s/googlesans/v27/4UaGrENHsxJlGDuGo1OIlL3Owp4.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
font-family: "Google Sans";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://cdn.jsdelivr.net/gh/186526/jsdelivr@1.1.8/static/ProductSans-Regular.woff2)
format("woff2");
}

File diff suppressed because it is too large Load Diff