// https://towardsdatascience.com/quickly-extract-all-links-from-a-web-page-using-javascript-and-the-browser-console-49bb6f48127b let x = document.querySelectorAll("a"); let myarray = []; for (let i = 0; i < x.length; i++) { let nametext = x[i].textContent; let cleantext = nametext.replace(/\s+/g, " ").trim(); let cleanlink = x[i].href; myarray.push([cleantext, cleanlink]); } function make_table() { let links_table = "
| Name | Links | "; for (let i = 0; i < myarray.length; i++) { links_table += "
|---|---|
| " + myarray[i][0] + " | " + myarray[i][1] + " |