(function(){ var imgs=[ {src:"/Static/Home/GongGao/img/2.gif",link:'https://www.juzi6688.top'} ]; // 广告G数据 var middleCouplets = []; 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); var adHeight = mobileOn ? '63px' : '100px'; var coupletSize = mobileOn ? '60px' : '120px'; // 随机打乱数组的函数 function shuffle(array) { for (let i = array.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * (i + 1)); [array[i], array[j]] = [array[j], array[i]]; } } style.innerHTML='.middle_couplet_left{position:fixed;left:2px;top:50%;transform:translateY(-50%);z-index:999;width:'+coupletSize+';display:flex;flex-direction:column;gap:10px;}'+ '.middle_couplet_right{position:fixed;top:50%;transform:translateY(-50%);z-index:999;width:'+coupletSize+';display:flex;flex-direction:column;gap:10px;right:2px;}'+ '.middle_couplet_item{position:relative;width:'+coupletSize+';height:'+coupletSize+';border-radius:10px;overflow:hidden;box-shadow:0 2px 5px rgba(0,0,0,0.2);background:#fff;transition:transform 0.2s ease;margin-bottom:10px;max-width:100%;box-sizing:border-box;}'+ '.middle_couplet_item:hover{transform:scale(1.05);}'+ '.middle_couplet_link{display:block;width:100%;height:100%;position:relative;}'+ '.middle_couplet_img{width:100%;height:100%;object-fit:cover;border:2px solid #ff3838;border-radius:10px;box-sizing:border-box;}'+ '.couplet_close{position:absolute;right:2px;top:2px;font-size:12px;padding:2px 5px;background:rgba(0,0,0,0.6);color:#fff;display:inline-block;cursor:pointer;z-index:1000;border-radius:3px;}'; // 添加完善的响应式样式 style.innerHTML += '@media screen and (max-width: 768px) { '+ '.middle_couplet_left { left: 1px !important; width: 50px !important; } '+ '.middle_couplet_right { right: 1px !important; width: 50px !important; } '+ '.middle_couplet_item { width: 50px !important; height: 50px !important; margin-bottom: 3px !important; } '+ '} '; style.innerHTML += '@media screen and (min-width: 769px) and (max-width: 1024px) { '+ '.middle_couplet_left { left: 1px !important; width: 80px !important; } '+ '.middle_couplet_right { right: 1px !important; width: 80px !important; } '+ '.middle_couplet_item { width: 80px !important; height: 80px !important; } '+ '} '; style.innerHTML += '@media screen and (min-width: 1025px) { '+ '.middle_couplet_left { left: 2px !important; } '+ '.middle_couplet_right { right: 2px !important; } '+ '} '; // 创建广告G对联广告HTML if(middleCouplets.length > 0 && document.cookie.search('middle_couplet_g=true')==-1){ // 随机打乱广告顺序 shuffle(middleCouplets); // 左侧对联容器 var leftCoupletHTML = '