-
Notifications
You must be signed in to change notification settings - Fork 2
/
fkbarrage.min.js
2 lines (2 loc) · 1.12 KB
/
fkbarrage.min.js
1
2
/*! FKbarrage v1.2 | FeikeWrold | www.fk68.net */
!function(a){a.fn.fkbarrage=function(b){var c=this,d=a.extend({ratio:4,style:"",speed:5e3},b),e={},f={pusshtxt:function(b,f){var o,q,r,s,t,g=a(window).width(),h=a(window).height(),i=d.ratio,j=.625*i,k=parseInt(g*(i/100)),l=4*k,m=parseInt(h/k),n=(new Date).getTime(),p=1;for(p;m>=p;p++)if(!e[p]){e[p]=n,o=p*k-k;break}q='<div id="now_'+n+'" style="height:'+i+"vw;line-height:"+i+"vw;position: absolute;white-space:nowrap;z-index: 9999;left:0;top:"+o+"px;"+d.style+'">',q+="<span id="+n+' style="opacity:0;font-size:'+j+"vw;line-height:"+i+"vw; padding-right:"+parseInt(j)+"vw; border-radius:"+i+"vw;display: inline-block;font-weight: bold; background-color: #000;color: #fff;",q+=f+'">'+b+"</span></div>",r=c.append(q).find("#now_"+n+" span"),s=r.width()+l,t=parseInt(.5/499*s*d.speed+249/499*d.speed),r.css({marginLeft:g,opacity:1}).animate({marginLeft:-s},{duration:t,step:function(a){var c=g-s;c>a&&e[p]==this.id&&delete e[p]},done:function(){a(this).parent().remove()}})},stoptxt:function(){console.log("肥客联邦")},hidetxt:function(){console.log("http://www.fk68.net")}};return f}}(jQuery);