Skip to content

Latest commit

 

History

History
12 lines (11 loc) · 477 Bytes

program-think-links-extractor.md

File metadata and controls

12 lines (11 loc) · 477 Bytes

Copy the following code to console, then it will extract all links appeared in the article.

{
  let urls = document.querySelector('#post-body-9131156520945940228').querySelectorAll('a')
  let container = document.createElement('div')
  let br = document.createElement('br')
  urls.forEach(a => {container.append(a); container.append(br.cloneNode(true))})
  document.body.replaceWith(container)
}