PageSourceSearch

https://dsy4567.github.io/js/analytics.js

js dsy4567.github.io collected 2026-10-03 09:05:08 UTC 1,271 bytes, 36 lines download raw bytes

1/**
2 * @fileoverview 适用于所有页面的统计脚本,包含 Google、Cloudflare、Vercel(废弃)统计服务
3 * @author dsy4567
4 * @license
5 * Copyright (c) 2022-2026 dsy4567
6 * SPDX-License-Identifier: MIT
7 */
8
9// @ts-check
10"use strict";
11
12export default (() => {
13	if (location.hostname !== "dsy4567.icu" && location.hostname !== "dsy4567.github.io") return;
14	const /** @type {HTMLScriptElement} */ s1 = document.createElement("script"),
15		ga_id = location.hostname === "dsy4567.icu" ? "G-9E9HPL4Y86" : "G-N7WR0PVV4J";
16	s1.async = true;
17	s1.src = "https://www.googletagmanager.com/gtag/js?id=" + ga_id;
18	document.body.append(s1);
19	window.dataLayer = window.dataLayer || [];
20	function gtag() {
21		dataLayer.push(arguments);
22	}
23	gtag("js", new Date());
24	gtag("config", ga_id);
25
26	const /** @type {HTMLScriptElement} */ s2 = document.createElement("script");
27	s2.async = true;
28	s2.setAttribute("data-cf-beacon", '{"token": "9ef701d58e594dcc960850227e0f2436"}');
29	s2.src = "https://static.cloudflareinsights.com/beacon.min.js";
30
31	// if (location.hostname !== "dsy4567.icu") return;
32	// const /** @type {HTMLScriptElement} */ s3 = document.createElement("script");
33	// s3.src = "/_vercel/insights/script.js";
34	//  s2.defer = true;
35	// document.body.append(s2);
36})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.