Skip to content

Instantly share code, notes, and snippets.

@madr
Created February 2, 2015 12:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madr/cad8672e0fd2d482988d to your computer and use it in GitHub Desktop.
Save madr/cad8672e0fd2d482988d to your computer and use it in GitHub Desktop.
var titles = [], urls = [], rows = document.querySelectorAll("#section0_column0 > div"), i = rows.length, lastI = i; while (i--) { titles.push(rows[i].getAttribute("data-title")); urls.push(rows[i].getAttribute("data-alternate-link")); } titles = titles.map(function (t, i) { return "[" + t + "][" + (i + 1) + "] \nskriv nåt bra här\n"; } ); console.log(titles.join("\n")); urls = urls.map(function (u, i) { return "[" + (i + 1) + "]: " + u; }); console.log(urls.join("\n"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment