Skip to content

Instantly share code, notes, and snippets.

@michaelmwu
Last active March 3, 2020 03:31
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelmwu/f7f3d3517c2ac252a1bd7068fbc190ee to your computer and use it in GitHub Desktop.
Save michaelmwu/f7f3d3517c2ac252a1bd7068fbc190ee to your computer and use it in GitHub Desktop.
Array.fromList = function(list) {
var array= new Array(list.length);
for (var i= 0, n= list.length; i<n; i++)
array[i]= list[i];
return array;
};
var lines = Array.fromList(document.querySelectorAll('.ecertificate-content')).map(function(node) {
var dds = node.querySelectorAll('dd');
return dds[0].textContent + "\t" + dds[1].textContent
});
console.log(lines.join('\n'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment