cf一键领取

花生 可爱的博主

时间: 2022-02-23 阅读: 36 字数:5065

{}
制作笔记

一键领取

function ameCSRFToken() {
        var sAMEStr = "@A4aqz01GQ" || 'a1b2c3';
        hash = 5381;
        for (var i = 0, len = sAMEStr.length; i < len; ++i) {
            hash += (hash << 5) + sAMEStr.charAt(i).charCodeAt();
        }
        return hash & 0x7fffffff;
    }

    function AMSSafeguard(safeguardTips){
    
        Dialog.hide();

        var remainingTime = Math.ceil((milo.cookie.get("_AMSSafeguard") - new Date().getTime())/1000);


        if(g('_AMSSafeguardTips')){
            //g('_AMSSafeguardTime').innerHTML = remainingTime;
            Dialog.show({id:'_AMSSafeguardTips'});
        }else{
            var tipsTPL = document.createElement("div"),
            //timeBox = document.createElement("span"),
                closeBtn = document.createElement("span"),
                timer,
                tipsTEXT_a = document.createTextNode(safeguardTips);
            

            tipsTPL.id = '_AMSSafeguardTips';
            tipsTPL.style.cssText = 'width:200px;height:40px;border:2px solid #389DD8; padding:15px 25px 25px 15px; background-color:#fff;font-size:14px;font-weight:bold; color:#389DD8;position:relative; _zoom:1;line-height:1.8';
            //timeBox.id = '_AMSSafeguardTime';
            //timeBox.innerHTML = remainingTime;
            closeBtn.id = '_AMSSafeguardClose';
            closeBtn.innerHTML = '&times;';
            closeBtn.style.cssText = 'width:16px;height:16px;font-size:14px;line-height:1;position:absolute; top:5px; right:5px; color:#F56813;cursor:pointer;';
            tipsTPL.appendChild(closeBtn);
            tipsTPL.appendChild(tipsTEXT_a);
            //tipsTPL.appendChild(timeBox);
            //tipsTPL.appendChild(tipsTEXT_b);
            document.body.appendChild(tipsTPL);
            Dialog.show({id:'_AMSSafeguardTips'});
        }
        //缁戝畾鍏抽棴tips灞?
        g('_AMSSafeguardClose').onclick = function(){
            Dialog.hide();
        };
        //鍔ㄦ€佹洿鏂板€掕鏃舵椂闂?
        var timer = setInterval(function(){
            if(remainingTime > 0){
                remainingTime -= 1;
                //g('_AMSSafeguardTime').infunction ameCSRFToken() {
        var sAMEStr = "@A4aqz01GQ" || 'a1b2c3';
        hash = 5381;
        for (var i = 0, len = sAMEStr.length; i < len; ++i) {
            hash += (hash << 5) + sAMEStr.charAt(i).charCodeAt();
        }
        return hash & 0x7fffffff;
    }

    function AMSSafeguard(safeguardTips){
        //先关闭已经显示的层
        Dialog.hide();
        //剩余过期时间
        var remainingTime = Math.ceil((milo.cookie.get("_AMSSafeguard") - new Date().getTime())/1000);

        //判断是否已经存在提示层
        if(g('_AMSSafeguardTips')){
            //g('_AMSSafeguardTime').innerHTML = remainingTime;
            Dialog.show({id:'_AMSSafeguardTips'});
        }else{
            var tipsTPL = document.createElement("div"),
            //timeBox = document.createElement("span"),
                closeBtn = document.createElement("span"),
                timer,
                tipsTEXT_a = document.createTextNode(safeguardTips);
            //tipsTEXT_b = document.createTextNode("秒后再试");

            tipsTPL.id = '_AMSSafeguardTips';
            tipsTPL.style.cssText = 'width:200px;height:40px;border:2px solid #389DD8; padding:15px 25px 25px 15px; background-color:#fff;font-size:14px;font-weight:bold; color:#389DD8;position:relative; _zoom:1;line-height:1.8';
            //timeBox.id = '_AMSSafeguardTime';
            //timeBox.innerHTML = remainingTime;
            closeBtn.id = '_AMSSafeguardClose';
            closeBtn.innerHTML = '&times;';
            closeBtn.style.cssText = 'width:16px;height:16px;font-size:14px;line-height:1;position:absolute; top:5px; right:5px; color:#F56813;cursor:pointer;';
            tipsTPL.appendChild(closeBtn);
            tipsTPL.appendChild(tipsTEXT_a);
            //tipsTPL.appendChild(timeBox);
            //tipsTPL.appendChild(tipsTEXT_b);
            document.body.appendChild(tipsTPL);
            Dialog.show({id:'_AMSSafeguardTips'});
        }
        //绑定关闭tips层
        g('_AMSSafeguardClose').onclick = function(){
            Dialog.hide();
        };
        //动态更新倒计时时间
        var timer = setInterval(function(){
            if(remainingTime > 0){
                remainingTime -= 1;
                //g('_AMSSafeguardTime').innerHTML = remainingTime;
            }else{
                Dialog.hide();
                //动态更新倒计时时间
                clearInterval(timer);
            }

        },1000);
    }

nerHTML = remainingTime;

                Dialog.hide();
                //鍔ㄦ€佹洿鏂板€掕鏃舵椂闂?
                clearInterval(timer);
            }
)}
本文章网址:https://www.sjxi.cn/detil/4b930f24e08a4bf2ba0625071fed3695

最新评论

当前未登陆哦
登陆后才可评论哦

湘ICP备2021009447号