Created
November 8, 2019 15:21
-
-
Save shrinkray/53a88830ae064c0071deeac76fefd609 to your computer and use it in GitHub Desktop.
A quick, in-browser console trick for getting content from an HTML page.
This file contains hidden or 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
| /** | |
| * In this example, I wanted to create a list of names of Custom Fields. | |
| */ | |
| const titles = document.querySelectorAll('.row-title'); | |
| for ( const title of titles ) { | |
| // Because it is returned in the browser, we're getting the VM numbering thing in console log | |
| // Experiment with a way to drop these in an array instead. | |
| console.log( title.textContent ); | |
| } | |
| // Without Destructuring, Returns | |
| VM5020:3 Assessment | |
| VM5020:3 Assets | |
| VM5020:3 Blog | |
| VM5020:3 Career | |
| VM5020:3 Case Study | |
| ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment