Created
November 23, 2011 03:17
-
-
Save half-ogre/1387798 to your computer and use it in GitHub Desktop.
This file contains 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
var linksArray = DomUtils.getElementsByTagName("link", item.children, false); | |
var entryLink = linksArray[0].attribs.href; | |
for (var i = 0; i < linksArray.length; i++) { | |
var linkRel = linksArray[i].attribs.rel.toLowerCase(); | |
if (linkRel === 'alternate') { | |
entryLink = linksArray[i].attribs.href; | |
break; | |
} | |
} | |
entry.link = entryLink; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I find this a bit more readable, but I'll admit it's not that much different.