Skip to content

Instantly share code, notes, and snippets.

@kbuczynski-nashpl
Created December 1, 2020 10:10
Show Gist options
  • Save kbuczynski-nashpl/0de69b5a1c5c93d01fc25cef5d834cd3 to your computer and use it in GitHub Desktop.
Save kbuczynski-nashpl/0de69b5a1c5c93d01fc25cef5d834cd3 to your computer and use it in GitHub Desktop.
Vertical Overflow finder
var all = document.getElementsByTagName("*"), i = 0, rect, docWidth = document.documentElement.offsetWidth;
for (; i < all.length; i++) {
rect = all[i].getBoundingClientRect();
if (rect.right > docWidth || rect.left < 0){
console.log(all[i]);
all[i].style.borderTop = '1px solid red';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment