一键领取
javascript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
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 = '×';
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 = '×';
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);
}
)}

评论
登录后即可评论
分享你的想法,与作者互动
暂无评论