V
V
VN2021-03-22 17:53:37
Google Chrome
VN, 2021-03-22 17:53:37

How to see all urls on a page?

Tell me, is there an option in developer mode to display the full paths of all url addresses on the page?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Karbivnichy, 2021-03-22
@kavabangaungava

Yes, I have. Console is called.

var links = document.getElementsByTagName("a")

for (i = 0; i < links.length; i++) {
  var link = links[i].href;
  if(link.startsWith('http')) // HACK Некоторые ссылки имеют вид "javascript:void(0)"
  {
    console.log(link)
  }
  i++;
}

6058b8aea61a2741220599.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question