Created
July 22, 2018 18:44
-
-
Save schalkburger/c805f9463c5d0e76ba39be1018a51f86 to your computer and use it in GitHub Desktop.
Bookmarklet - Debug horizontal scroll
This file contains 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
javascript:(function(d){var w=d.documentElement.offsetWidth,t=d.createTreeWalker(d.body,NodeFilter.SHOW_ELEMENT),b;while(t.nextNode()){b=t.currentNode.getBoundingClientRect();if(b.right>w||b.left<0){t.currentNode.style.setProperty('outline','1px dotted red','important');console.log(t.currentNode);}};}(document)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment