This commit is contained in:
186526 2021-04-24 19:27:28 +08:00
parent 1be1cb0c79
commit 1bd7c6c62c
Signed by untrusted user: 186526
GPG Key ID: C7EB1E6B8CC5E51D
1 changed files with 99 additions and 96 deletions

View File

@ -1,3 +1,4 @@
(function () {
console.log('\n %c 186526\'s Blog | © 186526 \n', 'color: #fff; background: #444; padding:5px 0;'); console.log('\n %c 186526\'s Blog | © 186526 \n', 'color: #fff; background: #444; padding:5px 0;');
window.addEventListener("load", () => { window.addEventListener("load", () => {
whenAvailable("Pjax", () => { whenAvailable("Pjax", () => {
@ -43,10 +44,14 @@ window.addEventListener('load', () => {
a.src = "https://www.googletagmanager.com/gtag/js?id=G-ENYRL7T64N"; a.src = "https://www.googletagmanager.com/gtag/js?id=G-ENYRL7T64N";
d.head.appendChild(a); d.head.appendChild(a);
} }
if(typeof navigator.connection !== "undefined") {
if (navigator.connection.rtt <= 600 & navigator.connection.downlink >= 0.5) { if (navigator.connection.rtt <= 600 & navigator.connection.downlink >= 0.5) {
fontsInit(); fontsInit();
} else { } else {
setTimeout(fontsInit, 10000); setTimeout(fontsInit, 5000);
}
}else {
setTimeout(fontsInit,1000);
} }
window.dataLayer = window.dataLayer || []; window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); } function gtag() { dataLayer.push(arguments); }
@ -93,6 +98,4 @@ globalThis.__BLOG__ = (() => new Object({
name: "186526's Blog", name: "186526's Blog",
use: "hexo@^5.0", use: "hexo@^5.0",
}))(); }))();
(function () {
})(); })();