You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 19
Next »
Search
User documentation
Documentation CZ
Documentation EN
Developers
System Requirements
(function( $ ){
$.extend( {
jTwitter: function( username, numPosts, fnk ) {
var info = {};
// If no arguments are sent or only username is set
if( username == 'undefined' || numPosts == 'undefined' ) {
return;
} else if( $.isFunction( numPosts ) ) {
// If only username and callback function is set
fnk = numPosts;
numPosts = 5;
}
var url = "http://twitter.com/status/user_timeline/"
+ username + ".json?count="+numPosts+"&callback=?";
$.getJSON( url, function( data ){
if( $.isFunction( fnk ) ) {
fnk.call( this, data );
}
});
}
});
})( jQuery );
function replaceURLWithHTMLLinks(text) {
var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;
return text.replace(exp,"
$1");
}
(function( $ ){
$.extend( {
jTwitter: function( username, numPosts, fnk ) {
var info = {};
// If no arguments are sent or only username is set
if( username == 'undefined' || numPosts == 'undefined' ) {
return;
} else if( $.isFunction( numPosts ) ) {
// If only username and callback function is set
fnk = numPosts;
numPosts = 5;
}
var url = "http://twitter.com/status/user_timeline/"
+ username + ".json?count="+numPosts+"&callback=?";
$.getJSON( url, function( data ){
if( $.isFunction( fnk ) ) {
fnk.call( this, data );
}
});
}
});
})( jQuery );