PageSourceSearch

https://ggpic.cc/static/jq.js

js ggpic.cc collected 2026-10-05 04:33:25 UTC 2,145 bytes, 47 lines download raw bytes

1function formatDate(date) {
2  // 如果不传参数,默认使用当前时间
3  const d = date || new Date();
4  // 补零:确保月份/日期是两位数(比如1月→01,5日→05)
5  const year = d.getFullYear();
6  const month = String(d.getMonth() + 1).padStart(2, '0'); // 月份+1(因为0=1月)
7  const day = String(d.getDate()).padStart(2, '0');
8  
9  return `${year}-${month}-${day}`;
10}
11var script = document.createElement('script');
12  // 设置异步和延迟属性
13  script.async = true;
14  script.defer = true;
15  script.src = "/static/notice_icon.js?ref="+location.origin;//+"&ts="+formatDate()
16
17  // 添加到文档头部
18  document.head.appendChild(script);
19function supportsTailwind4() {
20        if (!window.CSS) return false; // 极端旧浏览器
21
22        // 精简后的核心特性列表(必选依赖)
23        const requiredFeatures = [
24            // 1. CSS 变量(Tailwind 4 主题系统和动态样式的核心,必选)
25            CSS.supports('color', 'var(--tw-primary)'),
26            // 2. 容器查询(Tailwind 4 响应式布局的重要增强,常用)
27            CSS.supports('container-type: inline-size'),
28            // 3. 逻辑属性(Tailwind 4 可能大量使用,如 margin-inline、padding-block)
29            CSS.supports('margin-inline: 1rem'),
30            // 4. clamp() 函数(Tailwind 4 响应式尺寸的基础,如 text-[clamp(1rem,2vw,2rem)])
31            CSS.supports('font-size: clamp(1rem, 2vw, 2rem)')
32        ];
33
34        // 所有核心特性支持则判定为兼容
35        return requiredFeatures.every(Boolean);
36        }
37
38    // 若不支持关键特性,则替换为兼容版 CSS(已处理兼容性)
39    if (!supportsTailwind4()) {
40      const link = document.createElement('link');
41      link.rel = 'stylesheet';
42      link.href = '/static/tailwind-full.min.css'; // 无 CSS 变量的降级样式
43      document.head.appendChild(link);
44      const script = document.createElement('script');
45      script.src = '/static/bundle.js'; // 无 CSS 变量的降级样式
46      document.head.appendChild(script);
47    }

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.