Показать сообщение отдельно
  #1 (permalink)  
Старый 26.11.2014, 13:03
Новичок на форуме
Отправить личное сообщение для funkaaadelic Посмотреть профиль Найти все сообщения от funkaaadelic
 
Регистрация: 26.11.2014
Сообщений: 1

Помогите со строчками
сижу ковыряю уже который час, так и не могу понять из за чего всё с новой строки начинается.
помогите люди добрые.

window.centovacast===undefined&&(window.centovacast={}),
window.centovacast.options===undefined&&(window.centovacast.options={}),
window.centovacast.loader===undefined&&(window.centovacast.loader={attempts:0,external_jquery:!1,loaded:!1,ready:!1,widget_definitions:{},url:"",load_script:function(e)

{
	var t=document.createElement("script");

	t!==undefined&&(t.setAttribute("type","text/javascript"),t.setAttribute("src",e),t!==undefined&&document.getElementsByTagName("head")[0].appendChild(t))
}
	,load_widget:function(e)

{
	var t=this.widget_definitions[e];

t.ref===null&&(t.ref=t.define(jQuery))

}
	,jq_get_jsonp:function(e,t,n)
{
	return jQuery.ajax(
	{
	type:"GET",url:e,data:t,success:n,dataType:"jsonp"
	})
	},jq_ready:function()
{
this.ready=!0;

for(var e in this.widget_definitions)typeof this.widget_definitions[e].init=="function"&&this.widget_definitions[e].init(jQuery)},jq_loaded:function()

{
	this.external_jquery||jQuery.noConflict(),jQuery.getJSONP=this.jq_get_jsonp;

for(var e in this.widget_definitions)this.load_widget(e);

this.loaded=!0;

var t=this;

jQuery(document).ready(function()
	{
	t.jq_ready()})},wait:function()
	
{
	setTimeout(function()
	{
	window.centovacast.loader.check()
	},100)
	}
	,check:function()
	{
	typeof jQuery=="undefined"?(this.wait(),this.attempts++):this.jq_loaded()
	}
	,init:function()
	{
	var e=document.getElementsByTagName("script"),t=e[e.length-1],n;

n=t.getAttribute.length!==undefined?t.getAttribute("src"):t.getAttribute("src",2),n.match(/^https?:\/\//i)||(n=window.location.href),this.url=n.replace(/(\.(?:[a-z]{2,}|[0-9]+)(:[0-9]+)?\/).*$/i,"$1"),this.external_jquery=typeof jQuery!="undefined",this.external_jquery||this.load_script(this.url+"system/jquery.min.js"),this.check()
}

,add:function(e,t,n)
{
this.widget_definitions[e]||(this.widget_definitions[e]=

{
define:n,init:t,ref:null
}),this.loaded&&this.load_widget(e),this.ready&&t(jQuery)}},window.centovacast.loader.init()),window.centovacast.loader.add("recenttracks",function(e)
{
e.extend(window.centovacast.recenttracks.settings,window.centovacast.options.recenttracks),e(".cc_recenttracks_list").each(window.centovacast.recenttracks.load),window.centovacast.recenttracks.poll_all()
}
,function(e)
{
return window.centovacast.options.recenttracks=e.extend(
{
}
,window.centovacast.options.recenttracks,window.centovacast.recenttracks?window.centovacast.recenttracks.config:null),e("<link/>",
{
rel:"stylesheet",type:"text/css",href:window.centovacast.loader.url+"widget_recenttracks.css"
}).appendTo(e("body")),window.centovacast.recenttracks=
{
pollcount:0,settings:
{
poll_limit:60,poll_frequency:6e4,track_limit:0,show_covers:0,scale_covers:1,buy_target:"_blank"
}
,registry:
{
}
,show_loading:function(t)
{
var n=this.get_container(t),r=e("<div/>",
{
id:"cc_recenttracks_throbber_"+t,css:
{
textAlign:"center",display:"none"
}
,html:'<img src="'+window.centovacast.loader.url+'system/images/ajax-loading.gif" align="absmiddle" />'
});

r.addClass("cctrack"),r.appendTo(n),r.fadeIn("fast")
}
,clear_loading:function(t)
{
e("#cc_recenttracks_throbber_"+t).remove()	
}
,get_container:function(t){return e("#"+this.registry[t].id)
	
}
,demote_first:function(t)
{
var n=this.get_container(t),r=e(".cctrack:first",n);

r.find(".cctitle").removeClass("ccnowplaying");

var i=r.find(".cctime");

i.removeClass("ccnowplaying"),i.html(i.data("timestr"))
}

,create_new:function(t,n,r)

{
var i=e("<div/>");

i.addClass("cctrack");

var s=e("<div/>");

s.addClass("ccdetails");

if(window.centovacast.recenttracks.settings.show_covers)
{
var o=e("<div/>");

o.addClass("cccover");

var u=e("<img/>",{src:t.image});

r.w&&u.attr("width",r.w),r.h&&u.attr("height",r.h),u.appendTo(o),o.appendTo(i),s.addClass("ccdetails_withcover")
}

var a=e("<div/>",
{html:t.title});

var f=e("<div/>",
{html:t.artist});

f.addClass("ccartist"),f.appendTo(s);

a.addClass("cctitle"),n&&a.addClass("ccnowplaying"),a.appendTo(s);


var h=!1;

n&&window.centovacast.streaminfo&&window.centovacast.streaminfo.state&&(h=window.centovacast.streaminfo.state.serverstate&&window.centovacast.streaminfo.state.sourceconn);

var p=e("<div/>",{html:h?window.lang.nowplaying:t.localtime});

return p.addClass("cctime"),n&&(p.data("timestr",t.localtime),p.addClass("ccnowplaying")),p.appendTo(i),s.appendTo(i),window.centovacast.recenttracks.settings.show_covers&&e("<div/>",
{
css:
{clear:"both",fontSize:"0px",height:"0"}
}
).appendTo(i),i},slide_to_next:function(e,t)
{
e.slideDown("slow",function()
{
window.centovacast.recenttracks.next(t)
})
},_animate_next:function(e)
{
var t=this.registry[e].pending_tracks.pop();

if(!t)return;

t.time>this.registry[e].since&&(this.registry[e].since=t.time);

var n=this.get_container(e);

this.demote_first(e);

var r=this.create_new(t,!0,this.registry[e].options);

r.hide(),r.prependTo(n),this.slide_to_next(r,e)}
,animate_next:function()
{
var t=e(this).data("ccusername");

if(typeof t!="string")return;

e(this).remove(),window.centovacast.recenttracks._animate_next(t)
}
,next:function(t)
{
if(!this.registry[t].pending_tracks.length)return;

var n=this.get_container(t),r=e(".cctrack",n).length>=this.registry[t].tracklimit;

r?e(".cctrack:last",n).data("ccusername",t).fadeOut("slow",this.animate_next):this._animate_next(t)
}
,check_username:function(e){e+="";

if(!this.registry[e])
{
	if(this.registry.length==1)
{
	for(var t in this.registry)e=t;

return e

}
return""
}
return e
},_handle_json:function(t)
{if(!t)return;

var n=this.check_username(t.rid);

if(!n.length)return;

var r=this.get_container(n),i;

if(t.type=="error"||t.data&&t.data.length&&t.data.length==1){var s=t?t.error?t.error:t.data[0]:"No JSON object";

r.empty(),i=e("<div />",{html:'<span title="'+s+'">Unavailable</span>'}),i.addClass("cctrack"),i.appendTo(r),this.clear_loading(n)}
else{var o=t.data[0],u=t.data[1],a=t.data[2],f=this.settings.track_limit?this.settings.track_limit:t.data[3],l=t.data[4];

u&&r.html("");

if(u)

{
window.lang||(window.lang={}),window.lang.buyalbum=a[0],window.lang.nowplaying=a[1],window.lang.notracks=a[2],this.registry[n].tracklimit=f,this.registry[n].options=l,r.hide();

for(var c=0;

c<o.length;

c++)r.append(this.create_new(o[c],c===0,this.registry[n].options)),o[c].time>this.registry[n].since&&(this.registry[n].since=o[c].time);

o.length||(i=e("<div/>"),i.addClass("cctrack"),i.append(window.lang.notracks).appendTo(r)),r.fadeIn("def")
}
	else this.registry[n].pending_tracks=o,this.next(n)}},handle_json:function(e)
{
	if(!e)return;
	return window.centovacast.recenttracks._handle_json(e)
}
,poll:function(t)

{
	var n=window.centovacast.loader.url+"external/rpc.php",r={m:"recenttracks.get",username:t,charset:this.registry[t].charset,since:this.registry[t].since,mountpoint:this.registry[t].mountpoint,rid:t};
	
	this.settings.track_limit&&(r.limit=this.settings.track_limit),e.getJSONP(n,r,this.handle_json)
}
	,_poll_all:function()
	{
	for(var e in this.registry)typeof e=="string"&&this.poll(e);
	
	(this.settings.poll_limit===0||this.pollcount++<this.settings.poll_limit)&&setTimeout(this.poll_all,this.settings.poll_frequency)
	}
	,poll_all:function()
	
{
	window.centovacast.recenttracks._poll_all()
}
,register:function(e,t,n,r)
{
	this.registry[t]=
	{
	id:e,charset:n,mountpoint:r,since:0,tracklimit:0	
	}
		}
	,load:function()

{
	var t=e(this).attr("id");
if(typeof t!="string")return;var n=t.replace(/^cc_recenttracks_/,""),r="",i="",s=/_cs-([A-Za-z0-9\-]+)$/,o=s.exec(n);o&&(r=o[1],n=n.replace(s,"")),s=/_mp-([A-Za-z0-9\-]+)$/,o=s.exec(n),o&&(i=o[1],n=n.replace(s,"")),window.centovacast.recenttracks.register(t,n,r,i),window.centovacast.recenttracks.show_loading(n)

}}});
Ответить с цитированием