Skip to content

Instantly share code, notes, and snippets.

@arnvgh
Created October 1, 2022 11:45
Show Gist options
  • Save arnvgh/00f1c18d783ef91215463e57ab608b97 to your computer and use it in GitHub Desktop.
Save arnvgh/00f1c18d783ef91215463e57ab608b97 to your computer and use it in GitHub Desktop.
Console logs all texts of same classes of a website :)
// Use inspect element to get classes of a particular element (Dont remove that "." before className you noob 🤡 )
const className = document.querySelectorAll('.<CHANGE WITH THE CLASS NAME>');
for (i = 0; i < className.length; i++) {
console.log(className[i].innerText);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment