Skip to content

Instantly share code, notes, and snippets.

@PatMyron
Created December 29, 2016 04:14
Show Gist options
  • Save PatMyron/801505572e7ed0be12ef6717f001afbe to your computer and use it in GitHub Desktop.
Save PatMyron/801505572e7ed0be12ef6717f001afbe to your computer and use it in GitHub Desktop.
var els = document.getElementsByTagName('span');
var h3s = document.getElementsByTagName('h3');
j=0;
for(i=0; i < els.length; i+=2) {
prop = els[i].getAttribute('itemprop');
if(prop) {
console.log(h3s[j++].innerHTML + ", " + els[i].innerHTML + ", " + els[i+1].innerHTML);
}
}
@PatMyron
Copy link
Author

PatMyron commented Mar 6, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment