$(function () {
var t = $("#backlinks").empty();
$("
").append($("").append("データを取得中・・・")).appendTo(t);
$.getJSON("http://query.yahooapis.com/v1/public/yql?callback=?", {
q: "select * from atom where url='http://blogsearch.google.co.jp/blogsearch_feeds?scoring=d&output=atom&num=100&q=link:" + location.href + "'",
format: "json"
}, function (data) {
t.empty();
if (data.query.results && data.query.results.entry) {
var ul = $("");
$.each(data.query.results.entry, function () {
var favicon = "http://www.faviconiac.com/favicon/" + this.author.uri.replace(/http:\/\/(.*?)\/.*$/, "$1") + "/";
$("").attr({
style: "list-style-type:image;list-style-image:url(" + favicon + ");"
}).append($("").attr({
href: this.link.href
}).append("(" + this.published + ") " + this.title.content)).appendTo(ul);
});
ul.appendTo(t);
} else {
$("").append("データを取得できませんでした。").appendTo(t);
}
});
});