Created
April 29, 2014 22:28
-
-
Save serkanserttop/a69b9ad9b03d4570f3d7 to your computer and use it in GitHub Desktop.
Turns text hrefs into actual links and appends as a new list - m202
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
var hrefs = $('.main-article > .wiki-article > pre > code').text().split('\n'), links = [], i = 0; | |
for(i; i < hrefs.length; i++){ | |
links.push('<a href="' + hrefs[i] + '">' + hrefs[i] + '</a>'); | |
} | |
$('.main-article > .wiki-article').append(links.join('<br>')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment