Last active
October 5, 2020 21:48
-
-
Save murez/a79965199e5dbf66cae932cddcb8c60e to your computer and use it in GitHub Desktop.
piazza file path generator
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
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