Created
July 24, 2019 09:36
-
-
Save julianxhokaxhiu/45bce4984a67d7db50756ca75244d08f to your computer and use it in GitHub Desktop.
Print a list of values out of a selector contaning multiple matches
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
/** | |
* This will print in your Console window a list of values out of a selector contaning multiple matches. | |
* | |
* How to install: Copy the whole line and drag it into your browser. | |
**/ | |
javascript:var selector = prompt('Insert your CSS selector'); var tmpbuf = ''; document.querySelectorAll(selector).forEach( el => tmpbuf += (el.innerText||el.textContent)+'\n' ); console.log(tmpbuf) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment