Created
December 20, 2019 07:32
-
-
Save JMalysiak/cfc3815c362c298abec172d230c99cf0 to your computer and use it in GitHub Desktop.
Extracts content of HTML elements into a plain text
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
var selector = prompt('Insert CSS selector'); | |
var elements = document.querySelectorAll(selector); | |
var text = ''; | |
for (var i = 0; i < elements.length; i++) { | |
text += elements[i].innerHTML + "\n"; | |
} | |
console.log(text); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment