Gribu uzzināt,kā man vajadzētu apstrādāt doto skriptu lai viņš raditu manus twitus? Kādi linki būtu jāliek esošo vietā?
Code
<script type="text/javascript">
// ==== Twitter's Login ==== //
var login_tw = 'ucoz_ru';
// ==== Twitter's Login ==== //
var pars=[0,login_tw,'3','200','110'];
var rname = "twit_"+Math.round(Math.random() * 10000);
var ttname = "twit_t"+Math.round(Math.random() * 10000);
var month_names = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
document.write("<div style='width:"+pars[3]+";height:"+pars[4]+";overflow:auto' id="+rname+"><div class='myWinLoad'></div></div>");
jQuery('#'+rname).append(jQuery('<table cellspacing="0" cellpadding="2" border="0" width="100%" id="'+ttname+'"/>'));
jQuery(document).ready(function() {jQuery.ajax({
timeout: 5000,
url:"http://twitter.com/statuses/user_timeline/"+pars[1]+".json?count="+pars[2],
dataType : "jsonp",
success: function CallBack(data){
if(typeof data !='undefined'){
jQuery('div','#'+rname).remove();
jQuery(data).each(function(i){
var d = new Date(data[i].created_at);
var date_show = month_names[d.getMonth()]+' '+d.getDate()+fix(d.getDate())+', '+d.getFullYear();
jQuery('#'+ttname,'#'+rname).
append(jQuery('<tr>').
append(jQuery('<td style="vertical-align:top;"/>')).
append(jQuery('<td style="vertical-align:top;"/>').
append('<p>'+data[i].text.substr(0,30)+'...</p><p class="tweet_data"><b>'+date_show+'</b></p>')));
})
}
}
})});
function fix(n) {
var a = ['st', 'nd', 'th'];
return a[n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2];
};
</script>