Created
April 4, 2025 22:32
-
-
Save mrwweb/17f11db03e219e3e9ae7e940550d3078 to your computer and use it in GitHub Desktop.
Useful Console Snippets
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
// Get list of text in items for copy-pasting (where each item is in class ".thing") | |
console.log(Array.from(document.querySelectorAll('.thing')).map(t=>t.innerText).join("\n")); | |
// Get multiple strings into a table from a single element | |
console.table(Array.from(document.querySelectorAll('.thing')).map(t=>[p.getAttribute('title'),p.textContent])); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment