Created
November 22, 2012 01:48
-
-
Save june29/4128978 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
$(".comments-entry").each(function() { | |
var comment = $(this); | |
var icon_url = comment.find(".icon").attr("src"); | |
var user_name = comment.find("dl dt strong a").text(); | |
var entry_title = comment.find("dl dd a").text(); | |
var entry_url = comment.find("dl dd a").attr("href"); | |
var result = '{'; | |
result += '\n title: "' + entry_title + '"'; | |
result += '\n url: "' + entry_url + '"'; | |
result += '\n author: {'; | |
result += '\n name: "' + user_name + '"'; | |
result += '\n icon: "' + icon_url + '"'; | |
result += '\n }'; | |
result += "\n}" | |
console.log(result); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment