PageSourceSearch

https://lingyuzhao.top/js/sharedVariables.js

js lingyuzhao.top collected 2026-10-06 13:16:05 UTC 1,811 bytes, 72 lines download raw bytes

1/**
2 * 进入网站或上一次登录的时间
3 * @type {number}
4 */
5let lastLoginTime = new Date().getTime();
6
7/**
8 * 登录允许的错误次数
9 * @type {number}
10 */
11let loginCount = 3;
12
13/**
14 * 登录错误的机会增加间隔时间
15 * @type {number} 间隔 毫秒值
16 */
17let loginCountAddTime = 60000;
18
19/**
20 * 是否跳转过密码申诉界面
21 * @type {boolean}
22 */
23let isToAppear = false;
24
25/**
26 * 锁住登录账户
27 */
28function lockLoginAccount() {
29    if (--loginCount <= 0) {
30        if (!isToAppear) {
31            // 如果是第一次被锁 就 跳转
32            window.open("appealPassword.html");
33            isToAppear = true;
34        }
35        const nowLT = loginCountAddTime;
36        const interval = setInterval(() => {
37            let number = loginCountAddTime - 1000;
38            const b = number <= 0;
39            const res_show = document.getElementById('login_userName_show')
40            if (res_show !== undefined) {
41                res_show.innerText = b ? '' : `${number / 1000} 秒之后可重新登录!`
42            }
43            if (b) {
44                loginCount = 3
45                number = nowLT << 1;
46                clearInterval(interval)
47            }
48            loginCountAddTime = number;
49        }, 1000);
50    }
51}
52
53/**
54 * 背景图的css
55 * @type {{"background-repeat": string, "background-size": string, "background-position": string}}
56 */
57const backImageCssUniversal = {
58    "background-repeat": "no-repeat",
59    "background-size": "cover",
60    "background-position": "center"
61};
62
63/**
64 * 按照给定的 css json 配置更新 css样式
65 * @param e 元素
66 * @param css css json 配置
67 */
68function setStyle(e, css) {
69    for (let cssKey in css) {
70        e.style[cssKey] = css[cssKey];
71    }
72}

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.