Skip to content

Instantly share code, notes, and snippets.

@markus-seidl
Created October 18, 2015 10:05
Show Gist options
  • Save markus-seidl/6b18046361481b9afbd3 to your computer and use it in GitHub Desktop.
Save markus-seidl/6b18046361481b9afbd3 to your computer and use it in GitHub Desktop.
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);
@markus-seidl
Copy link
Author

Converts a Instapaper article view with notes into a list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment