⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stlib.js

📁 超炫日历超炫日历超炫日历超炫日历超炫日历超炫日历超炫日历超炫日历超炫日历
💻 JS
📖 第 1 页 / 共 4 页
字号:
if (typeof _STNS == "undefined")
    {
    if (!Array.prototype.push)
        {
        Array.prototype.push = function()
            {
            for (var i = 0; i < arguments.length; i++)
                {
                this[this.length] = arguments[i];
                }
            return this.length;
            };
        }

    if (!Array.prototype.pop)
        {
        Array.prototype.pop = function()
            {
            if (this.length)
                {
                var o = this[this.length - 1];
                this.length--;
                return o;
                }
            };
        }

    if (!Array.prototype.shift)
        {
        Array.prototype.shift = function()
            {
            if (this.length)
                {
                var o = this[0];

                for (var i = 0; i < this.length - 1; i++)
                    {
                    this[i] = this[i + 1];
                    }
                this.length--;
                return o;
                }
            };
        }

    if (!Function.prototype.call)
        {
        Function.prototype.call = function(_5)
            {
            var _5 = _5 || window;
            _5.__tmp = this;
            var _6 =
                _5.__tmp(arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6],
                    arguments[7], arguments[8], arguments[9], arguments[10]);
            _5.__tmp = null;
            return _6;
            };
        }
    _STNS =
        {
        sVer: "3.0",
        bDebug: false,
        fvThrow: function(e)
            {
            },
        bBufImg: true,
        oImgs: {
        },
        fvBufImgs: function()
            {
            if (!_STNS.bBufImg)
                {
                return;
                }

            if (!_STNS.bLoaded)
                {
                var s = "";

                for (var i in _STNS.oImgs)
                    {
                    if (_STNS.oImgs[i] != 2)
                        {
                        s += _STNS.fsGetTag("div", "style=\"display:none\"", _STNS.fsGetImgTag(i, -1, -1));
                        }
                    _STNS.oImgs[i] = 2;
                    }
                document.write(s);
                }
            },
        bIsIE: false,
        bIsMIE: false,
        bIsFX: false,
        bIsOP: false,
        bIsSF: false,
        bIsKQ: false,
        oNav: null,
        bRTL: false,
        sDocMd: null,
        sURL: window.location.href + "",
        sDIR: null,
        bLocal: false,
        fsGetDocMd: function(w)
            {
            var w = w || window;

            switch (w.document.compatMode)
                {
                case "QuirksMode":
                case "BackCompat": return "quirks";

                case "CSS1Compat": return "css1";

                default: return document.compatMode;
                }
            },
        _foGetNav: function()
            {
            var _n = navigator, _u = _n.userAgent, _a = _n.appName, _p = _n.platform, n, v, p;

            if (/(Opera)[ \/]([\d\.]+)/.test(_u) || /(Netscape)\d*\/([\d\.]+)/.test(_u) || /(MSIE) ([\d\.]+)/.test(_u)
                || /(Safari)\/([\d\.]+)/.test(_u) || /(Konqueror)\/([\d\.]+)/.test(_u) || /(Gecko)\/(\d+)/.test(_u))
                {
                n = RegExp.$1.toLowerCase();
                v = RegExp.$2;
                }

            else
                {
                if (_a == "Netscape" && _n.appVersion.charAt(0) == "4")
                    {
                    n = "netscape4";
                    v = parseFloat(_n.appVersion);
                    }

                else
                    {
                    n = "unknow";
                    v = 0;
                    }
                }

            if (n == "netscape")
                {
                switch (_a)
                    {
                    case "Microsoft Internet Explorer":
                        n = "msie";
                        v = /(MSIE) ([\d\.]+)/.exec(_u)[2];
                        break;

                    case "Netscape":
                        n = "gecko";
                        v = /(Gecko)\/(\d+)/.exec(_u)[2];
                    }
                }

            if (/^(Win)/.test(_p) || /^(Mac)/.test(_p) || /^(SunOS)/.test(_p) || /^(Linux)/.test(_p)
                || /^(Unix)/.test(_p))
                {
                p = RegExp.$1.toLowerCase();
                }

            else
                {
                p = _p;
                }
            return {
            name: n,
            version: v,
            platform: p
            };
            },
        fiGetCT: function(w)
            {
            var w = w || window;

            if (_STNS.bIsIE)
                {
                return (_STNS.fsGetDocMd(w) == "css1" ? w.document.documentElement : w.document.body).scrollTop;
                }

            else
                {
                return w.pageYOffset;
                }
            },
        fiGetCL: function(w)
            {
            var w = w || window;

            if (_STNS.bIsIE)
                {
                return (_STNS.fsGetDocMd(w) == "css1" ? w.document.documentElement : w.document.body).scrollLeft;
                }

            else
                {
                return w.pageXOffset;
                }
            },
        fiGetCW: function(w)
            {
            var w = w || window;

            if (_STNS.bIsIE)
                {
                return (_STNS.fsGetDocMd(w) == "css1" ? w.document.documentElement : w.document.body).clientWidth;
                }

            else
                {
                if (w.scrollbars && w.scrollbars.visible || w.innerHeight < document.documentElement.offsetHeight)
                    {
                    return w.innerWidth - 20;
                    }
                }
            return w.innerWidth;
            },
        fiGetCH: function(w)
            {
            var w = w || window;

            if (_STNS.bIsIE)
                {
                return (_STNS.fsGetDocMd(w) == "css1" ? w.document.documentElement : w.document.body).clientHeight;
                }

            else
                {
                if (w.scrollbars && w.scrollbars.visible || w.innerWidth < document.documentElement.offsetWidth)
                    {
                    return w.innerHeight - 20;
                    }
                }
            return w.innerHeight;
            },
        foGetMediaInfor: function(s)
            {
            _STNS.fvThrow(new Error("_STNS.runTime error:call foGetMediaInfor that has not been implemented"));
            },
        oLibs: {
        },
        sLibPth: "",
        fvInitLib: function()
            {
            var scs, sc, s, t, ls, pth;

            if (_STNS.bIsFX && !_STNS.faGetElesByTagName("body").length)
                {
                var hds = _STNS.faGetElesByTagName("head");
                sc = hds[0].lastChild;
                }

            else
                {
                scs = _STNS.faGetElesByTagName("script");
                sc = scs[scs.length - 1];
                }

            if (sc)
                {
                s = sc.src;
                }

            if (s)
                {
                _STNS.sLibPth = s.substr(0, s.lastIndexOf("/") + 1);
                t = _STNS.fcoGetAttribute(sc, "sothinkdebug");

                if (t == "true")
                    {
                    pth = _STNS.fsGetAbsPth(_STNS.sLibPth + "debug/stdebug.js");

                    if (!_STNS.oLibs[pth])
                        {
                        _STNS.oLibs[pth] =
                            {
                            state: 1,
                            defer: 0
                            };
                        }
                    }

                t = _STNS.fcoGetAttribute(sc, "sothinklib");

                if (t)
                    {
                    ls = t.split(";");

                    for (var i = 0; i < ls.length; i++)
                        {
                        if (!ls[i])
                            {
                            continue;
                            }

                        if (!_STNS.fbIsFile(ls[i]))
                            {
                            ls[i] += ".js";
                            }
                        pth = _STNS.fsGetAbsPth(_STNS.sLibPth + ls[i]);

                        if (_STNS.oLibs[pth])
                            {
                            continue;
                            }
                        _STNS.oLibs[pth] =
                            {
                            state: 1,
                            defer: 0
                            };
                        }
                    }
                }

            else
                {
                _STNS.fvThrow(new Error("_STNS.runTime error:can't get lib path"));
                }
            },
        fvInc: function(s, f)
            {
            if (!_STNS.oLibs[s])
                {
                _STNS.oLibs[s] =
                    {
                    state: 1,
                    defer: f
                    };
                }
            },
        fvLoadLib: function()
            {
            var s = "";

            with (_STNS)
                {
                for (var i in oLibs)
                    {
                    if (oLibs[i].state != 2)
                        {
                        if (bLoaded)
                            {
                            fbInsJs(i);
                            }

                        else
                            {
                            s += fsGetJsTag(i, oLibs[i].defer);
                            }
                        oLibs[i].state = 2;
                        }
                    }
                }

            if (s)
                {
                document.write(s);
                }
            },
        bLoaded: false,
        _aLoads: [],
        fbAddLoad: function(f)
            {
            if (!_STNS.bLoaded && typeof f == "function")
                {
                return _STNS._aLoads.push(f);
                }

            else
                {
                if (_STNS.bLoaded)
                    {
                    _STNS.fvThrow(new Error("_STNS.runTime error:Page has been loaded!"));
                    }

                else
                    {
                    _STNS.fvThrow(new Error("_STNS.runTime error:Not a function is pushed into onload event!"));
                    }
                }
            return false;
            },
        _fvOnload: function()
            {
            with (_STNS)
                {
                if (bLoaded)
                    {
                    return;
                    }
                bLoaded = true;

                for (var j = 0; j < _aLoads.length; j++)
                    {
                    _aLoads[j]();
                    }
                }
            },
        _fvInitOnload: function()
            {
            if (_STNS.bIsIE && window.attachEvent)
                {
                window.attachEvent("onload", _STNS._fvOnload);
                }

            else
                {
                if (_STNS.oNav.name != "konqueror" && window.addEventListener)
                    {
                    window.addEventListener("load", _STNS._fvOnload, false);
                    }

                else
                    {
                    if (!window.onload || window.onload.toString() != _STNS._fvOnload.toString())
                        {
                        if (typeof window.onload == "function")
                            {
                            _STNS.fbAddLoad(window.onload);
                            }
                        onload = _STNS._fvOnload;
                        }
                    }
                }
            },
        _aCks: [],
        bCkPg: false,
        nCkTid: 0,
        nCkTime: 100,
        fvAddCk: function(f)
            {
            if (typeof f == "function")
                {
                with (_STNS)
                    {
                    if (bCkPg)
                        {
                        clearTimeout(nCkTid);
                        bCkPg = false;
                        }
                    _aCks.push(f);

                    if (bLoaded)
                        {
                        _fvCkPg();
                        }
                    }
                }

            else
                {
                _STNS.fvThrow(new Error("_STNS.runTime error:Not a function is pushed into check page event!"));
                }
            return false;
            },
        _fvCkPg: function()
            {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -