Skip to content

Instantly share code, notes, and snippets.

@muhsalaa
Created June 27, 2022 03:20
Show Gist options
  • Save muhsalaa/7832980595f5792536c64c1d68460407 to your computer and use it in GitHub Desktop.
Save muhsalaa/7832980595f5792536c64c1d68460407 to your computer and use it in GitHub Desktop.
find all hidden element
function findAllHidden() {
const all = document.getElementsByTagName('*');
const hidden = [];
for (let i = 0; i < all.length; i++) {
if (window.getComputedStyle(all[i]).display === 'none') {
hidden.push(all[i]);
}
}
return hidden;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment