制作笔记
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);
}
)}
本站为非盈利网站,如果您喜欢这篇文章,欢迎支持我们继续运营!
本站主要用于日常笔记的记录和生活日志。本站不保证所有内容信息可靠!(大多数文章属于搬运!)如有版权问题,请联系我立即删除:“abcdsjx@126.com”。
QQ: 1164453243
邮箱: abcdsjx@126.com