Created
October 25, 2022 01:24
-
-
Save ahmadharminto/7f64b8ce9b1193ac5359c25c17f3d8c5 to your computer and use it in GitHub Desktop.
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
(function (d) { | |
let 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'); | |
} | |
} | |
}(document)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment