(function($) { jQuery.fn.twitterTrackbackList = function(options){ var topsyOtterapi = 'http://otter.topsy.com/trackbacks.js'; var self = this; var tweetHtml = ''; function renderHtml(n) { return ( '
Twitterからのトラックバックはありません。
', exclude: [] }, options); if (options.removeHash) { options.url = options.url.replace(/#.+/, ''); } jQuery.ajax({ type: 'GET', url: topsyOtterapi, cache: false, dataType: 'jsonp', data: { perpage: '100', order: 'date', url: options.url }, success: function(trackbackData) { if(trackbackData.response.list.length == 0) { tweetHtml += options.noTrackback; } else { jQuery.each(trackbackData.response.list, function(n) { for (var i = 0; i < options.exclude.length; i++) { if (options.exclude[i] != this.author.nick) { tweetHtml += options.callback.call(this, n); } } }); if (!tweetHtml) { tweetHtml = options.noTrackback; } else if (options.wrapperTag) { tweetHtml = '<' + options.wrapperTag + '>' + tweetHtml + '' + options.wrapperTag + '>'; } } jQuery(self).append(tweetHtml); }, complete: function() {} }); }; })(jQuery);