Skip to content

Instantly share code, notes, and snippets.

@murez
Last active October 5, 2020 21:48
Show Gist options
  • Save murez/a79965199e5dbf66cae932cddcb8c60e to your computer and use it in GitHub Desktop.
Save murez/a79965199e5dbf66cae932cddcb8c60e to your computer and use it in GitHub Desktop.
piazza file path generator
file_links = [];
file_names = [];
results = document.getElementsByClassName("mw-100");
$.each(results, function(index, element){
current_element = $(element);
file_links.push( current_element.prop("href") );
file_names.push( current_element.text() );
});
file_links_output = file_links.join("\n");
file_names_output = file_names.join("\n");
console.log(file_links_output);
console.log(file_names_output);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment