Web/Scripts/fn.js

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

function getClass(oParent, sClass) {
    var value = [];
    var Ele = oParent.getElementsByTagName('*');
    for (var i = 0; i < Ele.length; i++) {
        var aClass = Ele[i].className.split(' ');
        for (n = 0; n < aClass.length; n++) {
            if (aClass[n] == sClass) {
                value.push(Ele[i]);
            }
        }
    }
    return value;
}

function getStyle(obj, name) {
    if (obj.currentStyle) {
        return obj.currentStyle[name];
    }
    else {
        return getComputedStyle(obj, false)[name];
    }
}
function Running(obj, json, fnEnd) {
    clearInterval(obj.timer);
    obj.timer = setInterval(function () {
        var now = 0;
        var bStop = true;
        for (var attr in json) {
            if (attr == 'opacity') {
                now = Math.round(parseFloat(getStyle(obj, attr)) * 100);
            }
            else {
                now = parseInt(getStyle(obj, attr));
            }
            var speed = (json[attr] - now) / 5;
            speed = speed > 0 ? Math.ceil(speed) : Math.floor(speed);
            if (now != json[attr]) bStop = false;
            if (attr == 'opacity') {
                obj.style.filter = 'alpha(opacity:' + now + speed + ')';
                obj.style.opacity = (now + speed) / 100;
            }
            else {
                obj.style[attr] = speed + now + 'px';
            }
        }
        if (bStop) {
            clearInterval(obj.timer);
            if (fnEnd) fnEnd();
        }
    }, 30);
}
window.onload = function () {
    var oBox = document.getElementById('box');
    var oTitle = getClass(oBox, 'title');
    var closed = '关闭窗口';
    var opened = '爱斯客服';
    var i = 0;

    oTitle[0].onclick = function () {
        i++;
后面还有 8 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。