Created
December 1, 2020 10:10
-
-
Save kbuczynski-nashpl/0de69b5a1c5c93d01fc25cef5d834cd3 to your computer and use it in GitHub Desktop.
Vertical Overflow finder
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
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