(function(){ var imgs=[ {src:"https://images.835images1.com:6699/images/960-80.gif",link:'https://ok.8358169.cc:8355/88.html?shareName=8358168.cc'} ]; var side={ left1:{src:"",link:''}, left2:{src:"",link:''}, left3:{src:"",link:''}, right1:{src:"",link:''}, right2:{src:"",link:''}, right3:{src:"",link:''}, } var ua = navigator.userAgent.toLocaleLowerCase(), mobileOn=ua.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i); dom=document.createElement('div'), style=document.createElement('style'), propaHTML=''; num=parseInt(Math.random()*imgs.length); style.innerHTML='.propa_bottom{position:fixed;width:100%;height:60px;left:0;bottom:0;background:rgba(0,0,0,0.5)}'+ '.propa_bottom img{display:block;width:auto;height:100%;margin:0 auto;}'+ '.propa_left1,.propa_left2,.propa_left3{position:fixed;left:0;}'+ '.propa_right1,.propa_right2,.propa_right3{position:fixed;right:0;text-align: right;}'+ '.propa_left1 img,.propa_left2 img,.propa_left3 img,.propa_right1 img,.propa_right2 img,.propa_right3 img{opacity: 1;max-height:100%;max-width:100%;}'+ '.propa_left1,.propa_right1{top:0}'+ '.propa_left2,.propa_right2{top:50%;margin-top:-7.25%}'+ '.close{position:absolute;right:0;top:0;font-size: 14px;padding: 5px 10px;background: rgba(0, 0, 0, 0.8);color: #fff;display: inline-block;}'+ '.propa_right1 .close,.propa_right2 .close,.propa_right3 .close{right:0; left:unset}'; if(imgs[num].src){ var dom1=document.createElement('div'); dom1.innerHTML=''+'关闭'; if(document.cookie.search('propa=true')==-1){ document.body.appendChild(dom1); document.getElementById('propa_bottom').onload = function(e){ style.innerHTML+='.propa_left3,.propa_right3{bottom:'+document.getElementById('propa_bottom').offsetHeight+'px}'; style.innerHTML+='body{padding-bottom: 60px !important;}'; } }else{ style.innerHTML+='.propa_left3,.propa_right3{bottom:0}'; } } if(mobileOn){ style.innerHTML+='.propa_right1,.propa_right2,.propa_right3,.propa_left1,.propa_left2,.propa_left3{width:20%;max-height: 25%;overflow:hidden}'; }else{ style.innerHTML+='.propa_right1,.propa_right2,.propa_right3,.propa_left1,.propa_left2,.propa_left3{width:200px;max-height: 25%;overflow:hidden}'; } if(!mobileOn||!imgs[num].src){ style.innerHTML+='.propa_left3,.propa_right3{bottom:0}'; } if(side.left1.src&&document.cookie.search('propa_left1=true')==-1){ propaHTML+=''+'关闭' } if(side.left2.src&&document.cookie.search('propa_left2=true')==-1){ propaHTML+=''+'关闭' } if(side.left3.src&&document.cookie.search('propa_left3=true')==-1){ propaHTML+=''+'关闭' } if(side.right1.src&&document.cookie.search('propa_right1=true')==-1){ propaHTML+=''+'关闭' } if(side.right2.src&&document.cookie.search('propa_right2=true')==-1){ propaHTML+=''+'关闭' } if(side.right3.src&&document.cookie.search('propa_right3=true')==-1){ propaHTML+=''+'关闭' } document.getElementsByTagName('head')[0].appendChild(style); dom.innerHTML=propaHTML; document.body.appendChild(dom); for(var i=0,max=document.getElementsByClassName('close').length;i