You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
3.0 KiB

5 years ago
!function(e,n){var t=function(t){function i(){var t=n(s.posParent),i=t.height()+s.boxStyle+n(e).height()-t.position().top-t.height();return i}function a(){u.find(".light-box img").removeClass().addClass(s.smallMove+" animated").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){n(this).removeClass()})}function o(){v=setInterval(a,7e3)}this.defaults={smallMoveImg:"//ubmcmm.baidustatic.com/media/v1/0f000nTu6IrRwN7Xpq-Ca0.jpg",smallMove:"shake",smallMoveTime:7e3,bigMoveImg:"//ubmcmm.baidustatic.com/media/v1/0f000QuuSx9HvmkZP0qie0.jpg",bigMove:"bounceInRight",link:"",boxStyle:24,trackSuperId:"",trackSId:"",posParent:".meau-gotop-box"};var s=n.extend(this.defaults,t),d=s.trackSuperId?'data-track-click=\'{"mod":"kp_popu_'+s.trackSuperId+"-"+s.trackSId+'","con":",'+s.link+",-\"}'":"",l="false"===localStorage.getItem("indexSuperise_"+s.trackSuperId),r='<link href="//csdnimg.cn/public/common/indexSuperise/1.0.3/indexSuperise.css?20190103174846" rel="stylesheet">';n("body").append(r);var c,v,m='<div class="indexSuperise">\n <div class="light-box">\n <a href="'+s.link+'" target="_blank" '+d+'>\n <img src="'+s.smallMoveImg+'" alt="">\n </a>\n </div>\n <div class="showBig animated '+s.bigMove+'">\n <div class="pos-box">\n <svg t="1540286119506" class="icon btn-close-adddd" style="width: 14px; height: 14px; fill: currentcolor; overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6698"><path d="M512 438.378667L806.506667 143.893333a52.032 52.032 0 1 1 73.6 73.621334L585.621333 512l294.485334 294.485333a52.074667 52.074667 0 0 1-73.6 73.642667L512 585.621333 217.514667 880.128a52.053333 52.053333 0 1 1-73.621334-73.642667L438.378667 512 143.893333 217.514667a52.053333 52.053333 0 1 1 73.621334-73.621334L512 438.378667z" fill="#ffffff" p-id="6699"></path></svg>\n <a href="'+s.link+'" target="_blank" '+d+'>\n <img src="'+s.bigMoveImg+'" alt="">\n </a>\n </div> \n </div><button class="btn-close-ad">关闭</button>\n </div>',u=n(m);if(!l){var p=setInterval(function(){if(c=n(s.posParent),c.length>0){clearInterval(p);var t=i();u.css({bottom:t+"px"});var d=n(s.trackSuperId?"#kp_box_"+s.trackSuperId:"body");d.removeAttr("data-track-click"),d.append(u),a(),"notMove"!==s.smallMove&&o(),n(e).scroll(function(){var e=i();u.css({bottom:e+"px"})})}},100);u.find(".light-box").hover(function(){u.find(".showBig").show(),clearInterval(v)}),u.find("svg.btn-close-adddd").click(function(e){e.preventDefault(),u.find(".showBig").removeAttr("style"),"notMove"!==s.smallMove&&o()}),u.find("button.btn-close-ad").click(function(){u.remove(),localStorage.setItem("indexSuperise_"+s.trackSuperId,!1)})}};e.csdn=e.csdn?e.csdn:{},e.csdn.indexSuperise=t}(window,window.jQuery);