Created
June 7, 2009 07:20
-
-
Save hail2u/125223 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(function () { | |
| var t = $("#backlinks").empty(); | |
| $("<p/>").append($("<em/>").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 = $("<ul/>"); | |
| $.each(data.query.results.entry, function () { | |
| var favicon = "http://www.faviconiac.com/favicon/" + this.author.uri.replace(/http:\/\/(.*?)\/.*$/, "$1") + "/"; | |
| $("<li/>").attr({ | |
| style: "list-style-type:image;list-style-image:url(" + favicon + ");" | |
| }).append($("<a/>").attr({ | |
| href: this.link.href | |
| }).append("(" + this.published + ") " + this.title.content)).appendTo(ul); | |
| }); | |
| ul.appendTo(t); | |
| } else { | |
| $("<p/>").append("データを取得できませんでした。").appendTo(t); | |
| } | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment