Created
October 18, 2015 10:05
-
-
Save markus-seidl/6b18046361481b9afbd3 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 b = "" + "<h2><a href=\"" + $(".original")[0]["href"]+ "\">" + $($("h1")[0]).text() + "</a></h2>\n" ; | |
b += "<ul>\n"; | |
$('.highlight').each(function(idx, data) { | |
var d = $(data); | |
var text = d.text(); | |
if(d.parent().is("a")) { | |
var text = "<a href=\"" + d.parent()[0]["href"] + "\">" + text + "</a>"; | |
} | |
b += "<li>" + text + "</li>\n"; | |
}); | |
b += "</ul>\n"; | |
console.log(b); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Converts a Instapaper article view with notes into a list.