Backup/Discuz.Web/javascript/template_mediaad.js
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
window.onload = getMsg;
window.onresize = resizeDiv;
//短信提示使用
var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0;
function getMsg()
{
var media_ad = document.getElementById("silverlightmediaad");
try{
divTop = parseInt(media_ad.style.top,10);
divLeft = parseInt(media_ad.style.left,10);
divHeight = parseInt(media_ad.offsetHeight,10);
divWidth = parseInt(media_ad.offsetWidth,10);
docWidth = document.body.clientWidth;
docHeight = document.body.clientHeight;
media_ad.style.top = parseInt(document.body.scrollTop,10) + docHeight + 10 + "px";// divHeight
media_ad.style.left = parseInt(document.body.scrollLeft,10) + docWidth - divWidth + "px";
media_ad.style.visibility = "visible";
objTimer = window.setInterval("moveDiv()",10)
}
catch(e){}
}
function resizeDiv()
{
var media_ad = document.getElementById("silverlightmediaad");
i+=1;
//if(i > 1000) closeDiv() //想不用自动消失由用户来自己关闭,可以屏蔽这句,也可以调整数字来实现停留时间,目前是10秒
try{
divHeight = parseInt(media_ad.offsetHeight,10);
divWidth = parseInt(media_ad.offsetWidth,10);
docWidth = document.body.clientWidth;
docHeight = document.body.clientHeight;
media_ad.style.top = docHeight - divHeight + parseInt(document.body.scrollTop,10) + "px";
media_ad.style.left = docWidth - divWidth + parseInt(document.body.scrollLeft,10) + "px";
}
catch(e){}
}
function moveDiv()
{
var media_ad = document.getElementById("silverlightmediaad");
try
{
if(parseInt(media_ad.style.top,10) <= (docHeight - divHeight + parseInt(document.body.scrollTop,10)))
{
window.clearInterval(objTimer);
objTimer = window.setInterval("resizeDiv()",1)
}
divTop = parseInt(media_ad.style.top,10);
media_ad.style.top = divTop - 10 + 'px';
}
catch(e){}
}
function closeDiv()
{
document.getElementById('silverlightmediaad').style.visibility='hidden';
if(objTimer)
window.clearInterval(objTimer)
后面还有 30 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
