Skip to content

Instantly share code, notes, and snippets.

@julianxhokaxhiu
Created July 24, 2019 09:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save julianxhokaxhiu/45bce4984a67d7db50756ca75244d08f to your computer and use it in GitHub Desktop.
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 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